Skip to content

Conversation

@vishnukothakapu
Copy link

Description

  • Implemented a PublicRoute component to prevent authenticated users from accessing the /login and /signup pages.
  • If a user is already logged in, they are automatically redirected to the /dashboard.

Related Issue

Fixes #106

Motivation and Context

  • This change improves user experience and route security by ensuring that logged-in users cannot manually navigate to authentication pages.
  • Previously, users could access /login even after logging in, which could cause confusion or session inconsistencies.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (improvement to an existing feature)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Test (adds or updates tests only)
  • Documentation (non-code change)

How Has This Been Tested?

  • Verified manually by logging in and attempting to navigate to /login and /signup pages.
  • Confirmed redirect to /dashboard when authenticated.
  • Tested behavior for logged-out users to ensure they can still access /login and /signup.

Screenshots (if applicable):

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@netlify
Copy link

netlify bot commented Oct 12, 2025

Deploy Preview for paisable failed. Why did it fail? →

Name Link
🔨 Latest commit 762b256
🔍 Latest deploy log https://app.netlify.com/projects/paisable/deploys/68f73ee09055870008ee03d9

Copy link
Member

@archa8 archa8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line 18 of your App.jsx commit, you have imported from ./components/gaurds, which is not a path and is causing the preview build to crash. Make the necessary changes and push your commit.

@vishnukothakapu
Copy link
Author

Hey @archa8, I’ve fixed the incorrect import path in App.jsx. The changes have been committed and pushed. please review and merge my PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Logged-in users can still access login page

2 participants