Repository navigation
Upgrade Better Auth to 1.7 and migrate MCP OAuth provider - #568
Merged
Merged
Conversation
Co-Authored-By: Cameron Pak <cameronandrewpak@gmail.com>
Co-Authored-By: Cameron Pak <cameronandrewpak@gmail.com>
Contributor
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: Cameron Pak <cameronandrewpak@gmail.com>
Co-Authored-By: Cameron Pak <cameronandrewpak@gmail.com>
Co-Authored-By: Cameron Pak <cameronandrewpak@gmail.com>
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.

Summary
Clears the last OSV findings left after #567 (Better Auth 1.6: GHSA-965c-763c-88jm critical, GHSA-q84f-53jg-9ppm and GHSA-r4xp-prcw-77qf high, GHSA-44jh-23m7-hpcf low). OSV now reports zero findings across root,
cli/andlanding/.Better Auth 1.7 removed the
mcpplugin andoAuthDiscoveryMetadata, so MCP OAuth moves to@better-auth/mcp+@better-auth/oauth-provider(all 1.7.26).migrations/0023_better_auth_1_7.sqlfollows the vendor path: dropsoauthAccessToken/oauthConsent/oauthApplicationand legacy consent codes inverification, then creates the 1.7 tables (oauthClient,oauthResource,oauthClientResource,oauthRefreshToken, ...) plus revocation generations. Users and sessions are untouched./.well-knowndiscovery URLs are unchanged. Account-bound consent, PKCE, resource validation and hashed tokens are kept, andresolveUserIdkeying and signup gates are unchanged.http://app.dotflowy.com), soscripts/cf-dev.tsanddev:apinow pass--local-upstream localhost:8787 --upstream-protocol http. Production HTTPS checks are unchanged.scripts/mint-mcp-token.tsupdated for the new consent flow. One root changeset; no CLI manifest change.Deploy note: run
bun run db:migrate:remotewith the deploy. Connected agents get a 401 and must sign in again.Testing
lint, fmt:check, typecheck (all),
bun run test(1141 pass, 0 fail), build:cf,db:migrate:localon fresh and existing DBs. Manual round trip: register 201 → consent → token → MCP initialize 200 → refresh 200 (old access 401) → revoke → access/refresh 401.Browser smoke on 5114c09, default
bun run cf:dev: auth and discovery return 200; consent page → code with matching state → PKCE exchange → MCP initialize 200; outline edit, indent and outdent persist across reload and sign-out/sign-in.Implemented in session Fix security vulnerabilities in dotflowy
Review with Devin · Open in Devin Desktop
Note
Devin could not open this Pull Request as cameronapak: they have no GitHub connection usable for this repository.
As a fallback, Devin opened this PR as itself.