Roll Better Auth back to 1.6 so MCP clients can register - #218
Merged
Conversation
1.7 rejects Cursor and Claude Code because both omit application_type and send a non-https callback. Pin the packages to 1.6.27 and add a migration that lets 1.6 insert account rows again. Leave the UI and make-check work from #216 in place. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Next 16 treats the git repo as the Turbopack workspace, so make dev already running in web/ wrote assets to web/web/.next. Pin the app root and ignore any leftover copy. Co-authored-by: Cursor <cursoragent@cursor.com>
Keeps client assets in web/.next so a leftover cache cannot restore them into web/web/.next on make dev. Co-authored-by: Cursor <cursoragent@cursor.com>
2 tasks
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.
Why
Better Auth 1.7, shipped in #216, rejects the OAuth client registration that both Cursor and Claude Code send. They leave out
application_type, so 1.7 treats them as browser apps and demands anhttps://callback on a real host. Cursor sendscursor://anysphere.cursor-mcp/oauth/callback. Claude Code sendshttp://localhost:3118/callback. Both get a 400 and never reach the sign-in page.Production is still on 1.6.27, which is why those same clients still work there. The upstream option that would accept these clients (
clientRegistrationDefaultApplicationType: "infer"in better-auth#10956) is not in 1.7.2.What this does
Pins
better-authand@better-auth/oauth-providerto1.6.27and restores the 1.6 provider settings (validAudiences,verifyAccessToken).Keeps the unrelated work from #216: the wide-table scrolling fix, comment counts, the deleted-run badge refactor, the
make checkrename, and the pyright bump.Leaves migrations
0043and0044in place (they already ran on staging). Adds0045, which drops theaccount.issuerNOT NULLconstraint and the unique index so Better Auth 1.6 can insert new account rows.Risk
Going back to 1.6.27 reopens GHSA-p2fr-6hmx-4528. The single-audience allow-list (
validAudiences) is the same mitigation the repo used before the upgrade.Do not promote staging to production until this lands.
Test plan
make checkalice@example.comclaude mcp addfor local reports "Needs authentication" instead of the https-callback errorapply-migrationsapplied0045claude mcp login data-hub-stagingMade with Cursor