From a12009ab7bb5e318714def5e9e17b05516c8a106 Mon Sep 17 00:00:00 2001 From: kaustubh Date: Wed, 6 Jan 2021 17:16:10 +0530 Subject: [PATCH] User login fixed --- src/actions/authAction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actions/authAction.js b/src/actions/authAction.js index 31d4b012..731b8778 100644 --- a/src/actions/authAction.js +++ b/src/actions/authAction.js @@ -39,7 +39,7 @@ export const loginUser = (userInfo, history) => async (dispatch) => { dispatch(setRequestStatus(false)); if(res.status === 200){ - const token = res.data.token; + const token = res.data.user.tokens.slice(-1)[0].token; dispatch(setRequestStatus(true)); localStorage.setItem("jwtToken", (token));