Skip to content

[BUG] protect /editor route at and navbar does not correctly reflect the user's authentication state #53

@nawinsharma

Description

@nawinsharma

Describe the bug
The /editor route is protected by middleware, but there is a UI/UX issue:

  • Unauthenticated users may briefly see the editor UI before being redirected, or
  • The navbar does not accurately reflect the user's authentication state (e.g., showing "Start editing" when not logged in).

To Reproduce
Steps to reproduce the behavior:

  1. Log out of the application.
  2. Navigate to /editor directly or via client-side navigation.

Expected behavior

  • Unauthenticated users should be immediately redirected to /login without seeing the editor UI.
  • The navbar should always show "Login" for unauthenticated users and "Start editing" for authenticated users.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Fedora 40]
  • Browser: [e.g. Chrome, Firefox]
  • Version: [e.g. Chrome 124, Firefox 115]

Additional context
This issue is about improving the user experience and security by adding client-side checks and updating the navbar logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions