Skip to content

[BUG] : "Too many authentication attempts" error when interrupting OAuth flow #2267

Description

@MoonLawlier

Bug Description

What happened?
When attempting to sign in using GitHub OAuth, if the authentication handshake is interrupted (e.g., clicking the sign-in button, navigating back using the browser button before the flow completes, and immediately trying to sign in again), the platform completely blocks the user. It serves a raw JSON endpoint error on the screen instead of handling the cancelled session gracefully.

What was expected instead?
The application should gracefully handle the interrupted flow, clear the broken auth state, and allow the user to retry signing in. If a rate limit is truly necessary, it should redirect the user back to the login page with a clean, user-friendly UI toast notification instead of raw backend JSON.

Steps to Reproduce

  1. Navigate to the DevTrack login page.
  2. Click on the "Sign in with GitHub" button.
    3.Before the GitHub authorization page fully finishes processing or redirecting, click the browser's Back button to return to DevTrack.
    4.Click the "Sign in with GitHub" button a second time.
    5.Notice that the application routes directly to /api/auth/signin/github and throws a hard block.

Affected Area

Authentication / Sign-in

Screenshots

file:///home/manaswi/Pictures/Screenshots/Screenshot%20from%202026-06-10%2014-11-57.png

Browser & OS

Ubuntu

Environment

Production (devtrack.site)

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggssoc:assignedGSSoC: Issue assigned to a contributorneeds-triageNeeds maintainer triage

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions