AOSSIE-Org / AOSSIE-Org/DebateAI
[BUG]: Auth failure redirects to /login, but no /login route exists
- Dominant language
- TypeScript
- Stars
- 84
- Forks
- 198
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
### Bug Description
## Description
`frontend/src/context/authContext.tsx` line 69 navigates to `/login` when token verification fails, but `App.tsx` defines no `/login` route. The navigation falls through the `*` catch-all (App.tsx line 105) and lands on `/`.
## Impact
A user with an expired/invalid token is silently dumped on the home page instead of the auth screen, with no indication they were logged out.
## Suggested Fix
Redirect to the actual auth route (`/auth` — see App.tsx route list), or add a `/login` alias route.
### Steps to Reproduce
_No response_
### Logs and Screenshots
_No response_
### Environment Details
_No response_
### Impact
High - Major feature is broken
### Code of Conduct
- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in frontend/src/context/authContext.tsx at line 69, then inspect the route list and catch-all in App.tsx, including line 105. Update the failed-token navigation to use the existing /auth route, and verify that an expired or invalid token reaches the auth screen instead of /.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100