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

Switch Redirect storage SessionStorage to LocalStorage #94

Merged
merged 4 commits into from
Mar 23, 2023

Conversation

jeffdaley
Copy link
Contributor

@jeffdaley jeffdaley commented Mar 15, 2023

Moves the user's redirectIntent from SessionStorage to LocalStorage, where it can survive a cross-origin transition. Sets a 2-minute expiration on the cookie to prevent old redirectIntents from sticking around.

@jeffdaley jeffdaley marked this pull request as ready for review March 15, 2023 19:11
@jeffdaley jeffdaley requested a review from a team as a code owner March 15, 2023 19:11
Copy link
Contributor

@jfreda jfreda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this offline, but just to put it here too - I think this is worth trying to see if it fixes the current issue where redirects aren't preserved in some cases. It's probably not the best way to handle this (the 2 minute expiration sorta-hack), but could be a beneficial interim solution.

@jeffdaley jeffdaley merged commit 29f38d9 into main Mar 23, 2023
@jeffdaley jeffdaley deleted the jeffdaley/session-storage branch March 23, 2023 21:56
@jeffdaley
Copy link
Contributor Author

jeffdaley commented Mar 23, 2023

Working on a PR that prefers sessionStorage but falls back to localStorage.

Update: #103

anuragprafulla pushed a commit to razorpay/hermes that referenced this pull request Jun 27, 2023
…ge#94)

* Switch from SessionStorage to LocalStorage

* Use expiring localStorage

* Add test
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.

None yet

2 participants