Skip to content

Commit

Permalink
fix: updated the state and added console.logs to check the return
Browse files Browse the repository at this point in the history
  • Loading branch information
rupato-deriv committed Feb 26, 2025
1 parent 97e1437 commit 928accc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/callback/callback-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const CallbackPage = () => {
return (
<Callback
onSignInSuccess={async (tokens: Record<string, string>, state: unknown) => {
console.log('state from oidcccc', state, tokens);
const accountsList: Record<string, string> = {};
const clientAccounts: Record<string, { loginid: string; token: string; currency: string }> = {};

Expand Down Expand Up @@ -54,7 +55,8 @@ const CallbackPage = () => {
}

const currency = sessionStorage.getItem('query_param_currency');
window.location.assign(typeof state === 'string' ? state : `/?account=${currency || ''}`);
console.log('state from oidcccc', state);
window.location.assign(typeof state === 'string' ? state : `/?account=${currency || 'USD'}`);
}}
renderReturnButton={() => {
return (
Expand Down

0 comments on commit 928accc

Please sign in to comment.