paisable icon indicating copy to clipboard operation
paisable copied to clipboard

bug: Logged-in users can still access login page

Open vishnukothakapu opened this issue 1 year ago • 5 comments

Expected Behavior

When a user is already logged in, they should not be able to access the login page. Instead, they should be automatically redirected to the dashboard or home page.

Current Behavior

After logging in, if the user manually navigates to the login page URL (e.g., /login), the login page still loads instead of redirecting.

Possible Solution

Implement an authentication guard on the login route that checks if the user is authenticated. If yes, redirect them to the dashboard or another appropriate page.

Steps to Reproduce

  1. Open the app and log in with valid credentials.
  2. After successful login, open a new tab or browser window.
  3. Navigate to the login page URL (e.g., example.com/login).
  4. Notice that the login page is displayed instead of a redirect.

Context (Environment)

This affects user experience by allowing logged-in users to see pages that are irrelevant to them, possibly causing confusion. It’s important to keep navigation flow logical and secure. OS: macOS (can be any) Browser: Chrome (or others)

Detailed Description

Users should have a smooth experience where once authenticated, pages like login or signup become inaccessible to them unless they log out. Currently, this navigation control is missing, allowing access to login page post-authentication.

Possible Implementation

Add route protection or conditional redirects in the routing logic, such as: React: Use a PrivateRoute / PublicRoute pattern with redirects.

vishnukothakapu avatar Oct 09 '25 13:10 vishnukothakapu

@vishnukothakapu Hi! Can you assign me to this issue please?

ptrjk avatar Oct 09 '25 15:10 ptrjk

Sorry @ptrjk, I'm currently working on the issue.

vishnukothakapu avatar Oct 09 '25 16:10 vishnukothakapu

Good catch! Assigned @vishnukothakapu

archa8 avatar Oct 09 '25 19:10 archa8

Assign these to me if not yet done

PrathmeshDesai avatar Oct 13 '25 18:10 PrathmeshDesai

Assign these to me if not yet done It’s already done @PrathmeshDesai.

vishnukothakapu avatar Oct 13 '25 18:10 vishnukothakapu