Skip to content

Commit

Permalink
Merge pull request #251 from rupato-deriv/Rupato/Test-silent-login-1
Browse files Browse the repository at this point in the history
fix: added cookies to fix silent login
  • Loading branch information
rupato-deriv authored Feb 17, 2025
2 parents 1444dad + d3d0739 commit 19740ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,10 @@ function App() {
React.useEffect(() => {
const accounts_list = localStorage.getItem('accountsList');
const client_accounts = localStorage.getItem('clientAccounts');
const active_loginid =
JSON.parse(Cookies.get('active_loginid') || '{}') || localStorage.getItem('active_loginid');
const active_loginid = Cookies.get('active_loginid') || localStorage.getItem('active_loginid');
console.log('test from app', {
active_loginid,
active_login_id_encrypted: JSON.parse(Cookies.get('active_loginid') || '{}'),
active_login_id_encrypted: Cookies.get('active_loginid') || '{}',
active_loginid_cookie: Cookies.get('active_loginid') || '{}',
active_loginid_local_storage: localStorage.getItem('active_loginid'),
});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/callback/callback-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const CallbackPage = () => {
}
if (!is_token_set) {
const active_loginid =
JSON.parse(Cookies.get('active_loginid') || '{}') || localStorage.getItem('active_loginid');
Cookies.get('active_loginid') || '{}' || localStorage.getItem('active_loginid');
console.log('test from callback', {
tokens,
active_loginid,
Expand Down

0 comments on commit 19740ef

Please sign in to comment.