Skip to content

Protect private routes and restrict access to authenticated users only #404

@omkarhole

Description

@omkarhole

This PR adds route protection to prevent unauthenticated users from accessing private pages such as the Dashboard, Analytics, Goals, and Settings.

Users who are not logged in will now be automatically redirected to the login page, improving overall security and user experience.

Why This Is Needed:

Currently, some pages can be accessed without proper authentication.
This creates security risks and breaks expected app behavior.

Protecting routes ensures:

  • User data is not exposed
  • Only authorized users can access sensitive pages
  • App follows standard security practices

@Renu-code123 please assign me

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions