-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Description
Description
Currently, when a user's session expires and they are redirected to the login page, they are not taken back to the page they were trying to access after logging in. This can lead to a frustrating user experience.
Proposed Solution
To improve the user experience, we propose implementing a redirect feature that sends users back to the page they originally requested after successful login. This can be done using a query parameter (e.g., ?next=...) in the URL.
-
Capture Original URL:
- When a user is redirected to the login page due to session expiration, capture the original URL they were trying to access.
- Append this URL as a query parameter (e.g.,
?next=<original_url>) to the login page URL.
-
Handle Redirect After Login:
- After a successful login, check for the presence of the
nextparameter in the URL. - Redirect the user to the original requested page if the parameter exists; otherwise, redirect to a default page (e.g., dashboard or homepage).
- After a successful login, check for the presence of the
Benefits
- This will provide a seamless user experience, allowing users to continue where they left off without additional navigation steps.
- It reduces frustration caused by losing track of the original page after logging in.
Additional Notes
Consider implementing this feature in conjunction with existing session management and authentication logic to ensure consistency.
Reactions are currently unavailable