OpenCut-app / OpenCut-app/OpenCut

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

Open
#53 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
89.8k
Forks
8.9k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the middleware and the /editor route, then inspect the navbar authentication logic and the /login redirect path. Reproduce the logged-out navigation behavior and verify that unauthenticated users never see the editor UI, while the navbar shows "Login" or "Start editing" according to authentication state.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.