Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added cookies to fix silent login #250

Merged

Conversation

rupato-deriv
Copy link
Contributor

This pull request includes changes to improve the handling of cookies and local storage in the App and CallbackPage components. The most important changes involve updating the default values used when parsing cookies to prevent potential errors.

Improvements to cookie handling:

  • src/app/App.tsx: Modified the default value for JSON.parse when retrieving active_loginid and active_login_id_encrypted from cookies to use an empty object ({}) instead of an empty string (''). This change helps prevent JSON parsing errors when the cookie is not present.
  • src/pages/callback/callback-page.tsx: Updated the default value for JSON.parse when retrieving active_loginid from cookies to use an empty object ({}) instead of an empty string (''). This change ensures more robust handling of missing cookies.

@rupato-deriv rupato-deriv merged commit 1444dad into deriv-com:master Feb 17, 2025
1 of 2 checks passed
Copy link

Name Result
Build status Failed ❌
Action URL Visit Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant