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

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

Open
A91y opened this issue Oct 18, 2024 · 11 comments
Open

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

A91y opened this issue Oct 18, 2024 · 11 comments
Assignees

Comments

@A91y
Copy link
Contributor

A91y commented Oct 18, 2024

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.

@A91y A91y added enhancement New feature or request SWOC INTERMEDIATE labels Oct 18, 2024
@prajwal2431
Copy link

i would like to contribute to it assign this issue to me

@A91y
Copy link
Contributor Author

A91y commented Dec 31, 2024

i would like to contribute to it assign this issue to me

Sure @prajwal2431 Go Ahead, but make sure you PR to dev branch only.
Thanks!

@prajwal2431
Copy link

Ohk I will make a pr to dev branch

@A91y A91y added SWOC BEGINNER and removed SWOC labels Jan 3, 2025
@A91y
Copy link
Contributor Author

A91y commented Jan 3, 2025

@prajwal2431 are you still on it?

@prajwal2431
Copy link

Sorry I was busy with some project work will go tommarrow for sure

@prajwal2431
Copy link

You can assign that issue to me

@harshdwivediiiii
Copy link

assign this issue to me

@A91y
Copy link
Contributor Author

A91y commented Jan 15, 2025

assign this issue to me

feel free to raise pr

@A91y
Copy link
Contributor Author

A91y commented Jan 15, 2025

@prajwal2431 are you still on it?

@harshdwivediiiii
Copy link

assign this issue to me

@A91y A91y assigned harshdwivediiiii and unassigned prajwal2431 Feb 6, 2025
@A91y
Copy link
Contributor Author

A91y commented Feb 6, 2025

@harshdwivediiiii assigned

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

No branches or pull requests

3 participants