Skip to content

Commit

Permalink
Merge pull request #235 from farabi-deriv/farabi/set-tokens-object-on…
Browse files Browse the repository at this point in the history
…-local-storage

farabi/set-tokens-object-on-local-storage
  • Loading branch information
farabi-deriv authored Jan 20, 2025
2 parents 7023a0c + b83a754 commit b95c74a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/callback/callback-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const CallbackPage = () => {
onSignInSuccess={(tokens: Record<string, string>) => {
const accountsList: Record<string, string> = {};
const clientAccounts: Record<string, { loginid: string; token: string }> = {};
console.log(tokens);

for (const [key, value] of Object.entries(tokens)) {
if (key.startsWith('acct')) {
Expand All @@ -28,6 +27,8 @@ const CallbackPage = () => {
localStorage.setItem('authToken', tokens.token1);
localStorage.setItem('active_loginid', tokens.acct1);

localStorage.setItem('tokens object', tokens);

window.location.assign('/');
}}
renderReturnButton={() => {
Expand Down

0 comments on commit b95c74a

Please sign in to comment.