Skip to content

Commit

Permalink
fix: user id on async-storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitarcitano committed Jun 29, 2021
1 parent 2071c1f commit 25dae36
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/auth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ export function Login({
additionalParameters,
});

console.log(jwtDecode(oAuthResponse.idToken));
const userId = jwtDecode<JwtPayload>(oAuthResponse.idToken).sub;

Promise.all([
setStorageItem('userApiToken', oAuthResponse.idToken),
setStorageItem('userRefreshToken', oAuthResponse.refreshToken),
setStorageItem(
'userId',
jwtDecode<JwtPayload>(oAuthResponse.idToken).sub
),
setStorageItem('userId', userId),
]);
}

Expand Down

0 comments on commit 25dae36

Please sign in to comment.