Skip to content

Commit

Permalink
feat: updated the flow of setting the token
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyvid7-Darus10 committed May 21, 2023
1 parent b336218 commit 04f19c9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/FaceLogin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ const FaceLogin: React.FC<FaceLoginProps> = ({
.then((data) => {
// Save token in local storage
localStorage.setItem('token', data.token);
if (redirectUrl) {
window.location.href = redirectUrl;
}
})
.catch((err) => console.error(err));
}

if (redirectUrl) {
window.location.href = redirectUrl;
}
}, []);

const defaultStyles: CSSProperties = {
Expand Down

0 comments on commit 04f19c9

Please sign in to comment.