fix(auth): accept Cursor's registration with a cursor:// callback until November - #240
Closed
mattzcarey wants to merge 2 commits into
Closed
mattzcarey wants to merge 2 commits into
mattzcarey wants to merge 2 commits into
Conversation
…il November Some Cursor versions register cursor://anysphere.cursor-mcp/oauth/callback next to their https and loopback callbacks. workers-oauth-provider 1.2 refuses the whole registration for it: 66 Cursor registrations in 77 minutes in production. On 0.10 the registration went through and Cursor signed in with the loopback callback. allowPrivateUseRedirectUris restores that. Our own /authorize check still refuses a request that uses a custom scheme, and remote http stays refused. TODO to remove in November, once people have upgraded Cursor.
… now With allowPrivateUseRedirectUris the provider no longer refuses ftp:// or a private-use scheme on /authorize; isAllowedOAuthRedirectUri does, with its own message. Still 400, no redirect, no grant.
Contributor
Author
|
Replaced by #241: workers-oauth-provider 1.2.1 accepts Cursor's registration without allowPrivateUseRedirectUris (cloudflare/workers-oauth-provider#391), and #241 drops our duplicate redirect check. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some Cursor versions register three callbacks:
workers-oauth-provider 1.2 (#236) refuses the whole registration because of the
cursor://one. Thedcr_refusedlogging from #237 counted 66 refused Cursor registrations in the first 77 minutes, from the IDE (node), the agent daemon (Cursor/1.0.0) and Cursor 3.3.30 on Linux. On 0.10 those registrations went through and Cursor signed in with its loopback callback, so this is a regression.allowPrivateUseRedirectUris: truerestores 0.10's behavior:cursor://…httpcallback/authorizeOur own
/authorizecheck (isAllowedOAuthRedirectUri) still only allows https or loopback. So a custom scheme can sit in a registration, but it never receives a code. Clients that register only a custom scheme (Claude Code'sclaude://, CodeBuddy, WorkBuddy, Warp) now register, then fail at/authorizeexactly as they did on 0.10.There's a TODO to remove this in November, once people have upgraded Cursor. Cursor 3.22.7 registers only the https and loopback callbacks.
tests/auth/private-use-redirects.test.tsruns end to end through the worker. Without the option, Cursor's registration gets 400.In
cimd.test.ts, theftp://andcom.example.client:/cases are now refused by our own check instead of the provider, so they expect its message. They still get a 400, no redirect and no grant.