solid-adventure / gh-issues

1 stars 0 forks source link

(AI Example) Remember redirect location after login #3

Open vgkids opened 4 hours ago

vgkids commented 4 hours ago

Remember redirect location after login

Problem Description

Currently, when an unauthenticated user attempts to access a protected route, they are redirected to the login page. However, after successful authentication, the user is always taken to the default dashboard page instead of their originally requested URL. This creates a poor user experience as users need to manually navigate back to their intended destination.

Current Behavior

  1. User attempts to access /protected-route
  2. System redirects to /login
  3. User successfully logs in
  4. System redirects to /dashboard (default landing page)

Proposed Solution

Implement a redirect mechanism that:

  1. Captures the original requested URL before redirecting to login
  2. Stores this URL in session storage or URL parameter
  3. Redirects the user to their intended destination after successful authentication
vgkids commented 3 hours ago

This is an example of an AI generated description.