generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
We can improve the below scenario:
- User access a webapp session URL
- Auth is expired, redirecting to sign-in page
- User signs in
- It now redirects to the root page instead of the url from step1
To improve this, we should store the URL in localStorage on redirect in step2, and restore it on another redircet on step4.
Redirect(step2) happens on Next.js middleware, so we can pass the original URL with HTTP header, and storing the URL in sign-in page. After a sucessful sign-in, it's always redirected to auth-callback page first. In the page we read the storage and redirect to the saved URL instead of root page.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels