Skip to content

[FEATURE] Redirect Users to Original Page After Login #24

@A91y

Description

@A91y

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.

  1. 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.
  2. Handle Redirect After Login:

    • After a successful login, check for the presence of the next parameter 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).

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions