Repository navigation
feat(auth): integrate Better Auth with Cloudflare D1 for MCP & OAuth 2.1 Dynamic Client Registration - #726
Merged
Conversation
…h 2.1 Dynamic Client Registration
⚡ Cloudflare Worker Preview Ready!
|
codercatdev
added a commit
that referenced
this pull request
Oct 13, 2026
…gistration to main (#727) * feat(syndication): add syndicate-post workflow and dispatch runner (#708) * fix(syndication): update Hashnode tag shape to PublishPostTagInput (#710) * fix(syndication): update Hashnode coverImage input to string URL (#713) * feat(seo): add VideoObject structured data and Gemini video storyboard pipeline (#715) * fix(video): upgrade to Gemini 2.5 Pro with native Google AI and OpenRouter support (#717) * feat: complete Shorts story (/shorts shelf + kinetic captions + sync), Gemini 2.5/TTS upgrades, and TechArticle/Auto-FAQ AEO pack (#720) * chore: remove legacy apps/web Next.js directory and revert Gemini/Shorts pipeline additions (keep SEO schema) (#722) * feat(analytics): add Cloudflare Workers Analytics Engine edge telemetry, sendBeacon click tracking, and first-party PostHog /ingest proxy (#724) * feat(site): wire sponsorships and guest booking to FlipFeeds Creator OS dev/prod APIs * fix(ci): deploy latest Worker version before updating secrets in deploy-workers.yml * fix(site): defer analytics_engine_datasets binding until Analytics Engine is enabled on account * feat(auth): integrate Better Auth with Cloudflare D1 for MCP and OAuth 2.1 Dynamic Client Registration (#726)
codercatdev
added a commit
that referenced
this pull request
Oct 13, 2026
…en issuance to main (#729) * feat(syndication): add syndicate-post workflow and dispatch runner (#708) * fix(syndication): update Hashnode tag shape to PublishPostTagInput (#710) * fix(syndication): update Hashnode coverImage input to string URL (#713) * feat(seo): add VideoObject structured data and Gemini video storyboard pipeline (#715) * fix(video): upgrade to Gemini 2.5 Pro with native Google AI and OpenRouter support (#717) * feat: complete Shorts story (/shorts shelf + kinetic captions + sync), Gemini 2.5/TTS upgrades, and TechArticle/Auto-FAQ AEO pack (#720) * chore: remove legacy apps/web Next.js directory and revert Gemini/Shorts pipeline additions (keep SEO schema) (#722) * feat(analytics): add Cloudflare Workers Analytics Engine edge telemetry, sendBeacon click tracking, and first-party PostHog /ingest proxy (#724) * feat(site): wire sponsorships and guest booking to FlipFeeds Creator OS dev/prod APIs * fix(ci): deploy latest Worker version before updating secrets in deploy-workers.yml * fix(site): defer analytics_engine_datasets binding until Analytics Engine is enabled on account * feat(auth): integrate Better Auth with Cloudflare D1 for MCP and OAuth 2.1 Dynamic Client Registration (#726) * fix(auth): handle automated MCP account linking and refresh token issuance (#728)
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
Resolves Gemini Custom MCP connection error (
Automatic registration with this server failed. Enter your OAuth client ID and client secret to connect.) by providing full RFC 7591 Dynamic Client Registration (DCR), RFC 8414 Authorization Server Metadata, RFC 9728 Protected Resource Metadata, and JWKS endpoints powered by Better Auth (better-auth,@better-auth/oauth-provider,@better-auth/mcp) backed by Cloudflare D1.Changes
apps/site/src/lib/auth.ts):jwt()and@better-auth/mcpplugin.env.DB) on Cloudflare Workers runtime with memory fallback for SSR/testing.allowDynamicClientRegistration: true,allowUnauthenticatedClientRegistration: true).apps/site/src/pages/oauth2/[...slug].ts):/oauth2/register,/oauth2/token,/oauth2/authorize, etc.apps/site/src/pages/oauth/[...slug].tsmapping/oauth/*to/oauth2/*./.well-known/oauth-authorization-server: RFC 8414 metadata advertisingregistration_endpoint, Auth.mdagent_auth, and authorization/token endpoints./.well-known/openid-configuration: OpenID Connect discovery./.well-known/oauth-protected-resource: RFC 9728 metadata.apps/site/src/pages/jwks.tsandapps/site/src/pages/.well-known/jwks.json.ts: Dynamic public cryptographic keys.apps/site/src/middleware.ts: RFC 8288 Link header pointing to authorization server.DB(codingcat-auth-devtop-level,codingcat-authinenv.production) inapps/site/wrangler.jsonc.0001_better_auth.sqlcovering core user/session, OAuth 2.1 provider (oauthClient,oauthResource, etc.), and JWKS tables. Migrations applied to remote D1 databases.