anythingmcp icon indicating copy to clipboard operation
anythingmcp copied to clipboard

Small refusals on the authorization page stop people from connecting

Open helpcodeai opened this issue 1 week ago • 1 comments

People who connect an AI client go through our authorization page. A few small refusals on that page stop some of them. This issue lists four details, with the numbers from 16 to 22 November 2026, and what we change for each. They are authentication details, so each one is its own commit and can be dropped on its own.

1. "Your session expired" after a second click or the back button

  • What happens: 46 refusals a day. Three quarters happen within a minute of loading the page. The person presses a provider button twice, reloads, or comes back from the provider's page with the back button. 27 % of the attempts that hit this never connect.
  • Why: the form token is replaced on every page load and dropped when a provider button is pressed.
  • Change: the token stays the same while the browser holds the same pending authorization. It is tied to that authorization and is refused for any other one. The consent decision still ends it.

2. The limit of 5 posts a minute per address

  • What happens: 127 refusals (HTTP 429) in a week, mostly on Windows.
  • Why: provider buttons, single sign-on, "Allow access" and Cancel count toward the same 5 as password attempts, although they check no password.
  • Change: password attempts keep 5 a minute per address. The buttons get their own counter, 30 a minute per address.

3. The answer to a wrong e-mail and password

  • What happens: 58 people typed an address that has no account. 9 typed a password for an account they made with Google, Microsoft or GitHub. Both get "Invalid email or password" and no next step.
  • Change: one text for every case. It says to use the provider button or to create an account first. It does not depend on the address. A sign-in with no password to check takes as long as a wrong password.

4. The sign-in cookie that lives 60 seconds

  • What happens: after signing in, the browser has 60 seconds to reach the callback.
  • Decision: no change. We found no refusals caused by it, and its short life is deliberate.

Not in scope

  • The form token still expires after 10 minutes while the authorization lives 30. About 7 refusals a day come after more than 10 minutes. After the change above the person gets a fresh form and one more click is enough.
  • No Prisma schema change, nothing under ee/, no change to the OAuth library.

How we measure

Per day: refusals of the form token, HTTP 429 on POST /auth/login, and the share of sign-in attempts that return to the AI client.

helpcodeai avatar Nov 22 '26 18:11 helpcodeai

Shipped with #1832 (live on Cloud since 22 November): the form token is tied to the pending authorization, the provider buttons have their own rate limit, and a wrong e-mail or password gets a clearer answer. Item 4 stays as decided here: no change. The measurement goes on in the daily check.

helpcodeai avatar Nov 23 '26 09:11 helpcodeai