Skip to content

fix(auth): tell people what to do when a sign-in link was already used - #426

Open
geoquant wants to merge 1 commit into
mainfrom
geoquant/oauth-transaction-error-copy
Open

geoquant wants to merge 1 commit into
mainfrom
geoquant/oauth-transaction-error-copy

Conversation

@geoquant

Copy link
Copy Markdown

People connecting a client (ESCALATION-14883, a ChatGPT connector on iPad) hit "Invalid Request: This authorization expired or was already used; start again" and read it as a broken connection, or as one account replacing the other. It's actually workers-oauth-provider's single-use, 10-minute sign-in record: the consent form or callback was submitted twice, or took too long. It happens before any grant exists, about 490 times a day against ~18.7k successful sign-ins, plus ~2,100 "not started in this browser" errors.

This replaces those provider messages on our error page with what happened and what to do:

  • Already used or expired: "This sign-in has already finished": the sign-in was completed or took longer than 10 minutes. If the app shows Cloudflare as connected, close the page; otherwise connect again from the app.
  • Not started in this browser / different browser session: "Finish signing in where you started": connect again and complete every step in the same browser.

The Error code: invalid_request line and the 400 status stay. Metrics still log the provider's original message, so auth_user error queries are unchanged. The provider has no distinct code for these, so they're matched by text; the route tests drive each through the real provider, so a reworded provider message fails a test.

Created with Claude Opus 5.5 in Pi.

@geoquant
geoquant requested review from a team as code owners November 21, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant