Skip to content

[bug]: Unauthenticated users see 404 error on Profile page instead of redirect to Login/Signup #69

@Aditya7005446231

Description

@Aditya7005446231

Hey there!
I noticed a small routing/auth bug while navigating the app. If a user isn't logged in yet and clicks on the "Profile" tab in the sidebar, it tries to fetch the data anyway and throws an Error loading profile: Request failed with status code 404 instead of redirecting them to the login or signup page.
To reproduce:
Open the site without logging in (or in an incognito window).
Click "Profile" on the left sidebar.
See the 404 error on the screen.

Image

I plan to add a simple auth check to the Profile route. If there is no active session/token, it will redirect the user to the login screen before making the API call.

@Ashmita1206 Could you please assign this issue to me under GSSoC?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions