workers-oauth-provider-migrate-1.0
Skill1.9k starsChanged 2 months agoMITView on GitHub
Upgrade a Cloudflare Worker's @cloudflare/workers-oauth-provider from 0.x, 1.0 or 1.1 to the latest 1.x. Use when bumping that dependency, or when OAuthProvider / OAuthAuthorizationServer / OAuthResourceServer construction throws after an upgrade.
Trending
More talk lately.about the whole repository
Who's talking about cloudflare/workers-oauth-provider
- A Hacker News story“Cloudlflare builds OAuth with Claude and publishes all the prompts”Hacker News · Jun 2, 2025 · 889 points
- @baldurbjarnason.com“A question I got over on Mastodon was about a project done by Cloudflare engineers, who claimed that an LLM …”Bluesky · Jun 4, 2025 · 64 likes
- @phillipcarter.dev“Many such cases: github.com/cloudflare/w... > I was trying to validate my skepticism. I ended up proving …”Bluesky · Jun 2, 2025 · 6 likes
- @skorfmann.com“github.com/cloudflare/w...”Bluesky · May 30, 2025 · 5 likes
- @tech-trending.bsky.social“GitHub - cloudflare/workers-oauth-provider: OAuth provider library for Cloudflare Workers…”Bluesky · Jun 3, 2025 · 2 likes
The biggest 5 of 53 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 53
Talked about on GitHub, Bluesky and Hacker News (53 times).
On GitHub · 44
- Mar 5, 2025explore Backend for Frontend (BFF) architecture pattern — chr33s/shopflare2 reactions
- Aug 16, 2026chore: bump the dependencies group across 1 directory with 13 updates — alandotcom/trainheroic-unofficial1 reaction · 2 comments
- Jul 27, 2026chore(deps): bump the minor-and-patch group across 1 directory with 26 updates — blakeox/courtlistener-mcp1 reaction · 1 comment
- Jul 6, 2026chore(deps): bump the minor-and-patch group across 1 directory with 25 updates — blakeox/courtlistener-mcp1 reaction · 1 comment
- Jun 29, 2026chore(deps): bump the minor-and-patch group across 1 directory with 26 updates — blakeox/courtlistener-mcp1 reaction · 1 comment
39 more on GitHub
- Jun 22, 2026chore(deps): bump the minor-and-patch group across 1 directory with 25 updates — blakeox/courtlistener-mcp1 reaction · 1 comment
- Jun 15, 2026chore(deps): bump the minor-and-patch group across 1 directory with 26 updates — blakeox/courtlistener-mcp1 reaction · 1 comment
- Jun 13, 2026Bump @cloudflare/workers-oauth-provider from 0.7.2 to 0.8.0 — martinthommesen/snow-mcp1 reaction · 1 comment
- Dec 22, 2025chore(deps): bump the cloudflare group across 1 directory with 3 updates — llu77/-lmm1 reaction · 2 comments
- Oct 5, 2026build(deps): bump @cloudflare/workers-oauth-provider from 0.8.1 to 1.2.1 — ProvisioInsights/LivingAtlas0 reactions
- Oct 5, 2026chore(deps): bump @cloudflare/workers-oauth-provider from 0.10.4 to 1.2.1 in /cod-server — TaharBn12/ecom10 reactions · 2 comments
- Oct 5, 2026Bump the npm-major group across 1 directory with 3 updates — Nishfleet/05090 reactions · 2 comments
- Oct 5, 2026chore(deps): bump @cloudflare/workers-oauth-provider from 0.10.4 to 1.2.1 in /cod-server — bighadj22/codflow0 reactions · 1 comment
- Oct 5, 2026chore(deps): bump @cloudflare/workers-oauth-provider from 0.10.4 to 1.2.1 in /cod-server — juldas3/codflow0 reactions · 1 comment
- Oct 5, 2026build(deps): bump the production-minor-patch group with 6 updates — isomorphic-team/isomorphic-app0 reactions
- Oct 5, 2026chore(deps): bump @cloudflare/workers-oauth-provider from 0.0.5 to 1.2.1 — PortNumber53/mcp-jira-thing0 reactions
- Oct 5, 2026deps(deps): bump @cloudflare/workers-oauth-provider from 0.10.3 to 1.2.1 — Spelling-Creator/spelling-creator0 reactions · 1 comment
- Oct 5, 2026chore(deps): bump @cloudflare/workers-oauth-provider from 0.10.4 to 1.2.1 in /cod-server — krimo-g13/codflow0 reactions · 1 comment
- Oct 5, 2026chore(deps)(deps): bump the npm-minor-patch group with 12 updates — pmaxhogan/healthy0 reactions · 1 comment
- Oct 5, 2026chore(deps): bump @cloudflare/workers-oauth-provider from 0.10.4 to 1.2.1 in /cod-server — TaharBn12/codflowv20 reactions · 1 comment
- Oct 5, 2026deps(deps): bump the cloudflare-runtime group across 1 directory with 4 updates — JohnTarbox/takemetothefair-cloudflare0 reactions · 2 comments
- Oct 4, 2026build(deps): bump @cloudflare/workers-oauth-provider from 0.10.3 to 1.2.1 — wakita181009/vault-mcp0 reactions
- Oct 4, 2026chore(deps): bump @cloudflare/workers-oauth-provider from 0.10.4 to 1.2.1 in /apps/worker — MOVEI144/CF-edge-mcp-kit0 reactions · 1 comment
- Oct 4, 2026Bump the dev-tooling group across 1 directory with 8 updates — dc28vivek/splittab-mcp0 reactions
- Oct 4, 2026build(deps): bump the cloudflare group across 1 directory with 2 updates — nyuchi/mongodb-mcp0 reactions · 3 comments
- Oct 3, 2026deps: bump @cloudflare/workers-oauth-provider from 0.10.4 to 1.2.1 — mazze93/github-mcp-gateway0 reactions
- Oct 1, 2026Bump @cloudflare/workers-oauth-provider from 0.10.3 to 1.2.1 in /worker — Agent9AI/keendreams-security0 reactions
- Oct 1, 2026Bump the npm-dependencies group across 1 directory with 22 updates — umbraco/Umbraco-Engage-MCP-Dev0 reactions
- Oct 1, 2026Bump the runtime group with 2 updates — profplum700/jules-mcp0 reactions
- Sep 30, 2026build(deps): Bump @cloudflare/workers-oauth-provider from 0.10.3 to 1.1.0 — Raoof128/gmail-mcp0 reactions
- Sep 30, 2026build(deps): bump @cloudflare/workers-oauth-provider from 0.10.3 to 1.1.0 — matcha-ai-test/banking-mcp0 reactions
- Sep 29, 2026chore(deps): bump @cloudflare/workers-oauth-provider from 0.10.3 to 1.1.0 — hamo/schwab-mcp0 reactions
- Sep 29, 2026build(deps): bump the production-dependencies group across 1 directory with 5 updates — simhskal/goodreads-mcp0 reactions · 1 comment
- Sep 29, 2026chore(deps-dev): bump @cloudflare/workers-oauth-provider from 0.10.3 to 1.2.1 in the dev-majors group across 1 directory — chrischall/mcp-connector0 reactions
- Sep 28, 2026Bump the remote-dependencies group in /remote with 2 updates — ta3leem-tools/ta3leem-mcp0 reactions
- Sep 28, 2026chore(deps): bump @cloudflare/workers-oauth-provider from 0.10.4 to 1.1.0 in /cod-server — ot2dz/codflow0 reactions · 1 comment
- Sep 28, 2026chore(deps): bump @cloudflare/workers-oauth-provider from 0.10.3 to 1.2.1 — Global-Strategic-Technologies/gst-website0 reactions · 1 comment
- Sep 28, 2026deps: bump @cloudflare/workers-oauth-provider from 0.10.3 to 1.1.0 — sametbasbug/orbit-remote-mcp0 reactions
- Aug 18, 2026Bump @cloudflare/workers-oauth-provider from 0.10.2 to 0.10.3 — anotb/driftglass0 reactions
- Aug 17, 2026build(deps): bump the cloudflare group across 1 directory with 2 updates — caseyWebb/yet-another-meal-planner0 reactions
- Aug 17, 2026chore(deps): bump @cloudflare/workers-oauth-provider from 0.8.1 to 0.10.3 in /worker — JGtHb/MCPbox0 reactions · 1 comment
- Aug 15, 2026build(deps): bump @cloudflare/workers-oauth-provider from 0.8.2 to 0.10.3 — erpipe-org/erpipe0 reactions · 1 comment
- Aug 15, 2026Bump @cloudflare/workers-oauth-provider from 0.8.3 to 0.10.3 in /apps/drafts-mcp — mxpf/write-placid0 reactions
- Aug 2, 2026Bump @cloudflare/workers-oauth-provider from 0.0.11 to 0.8.3 — ShinoharaTa/healthtool0 reactions
On Bluesky · 8
- Jun 4, 2025A question I got over on Mastodon was about a project done by Cloudflare engineers, who claimed that an LLM agent let them build it faster… — @baldurbjarnason.com64 likes and reposts · 2 replies
- Jun 2, 2025Many such cases: github.com/cloudflare/w... > I was trying to validate my skepticism. I ended up proving myself wrong. — @phillipcarter.dev6 likes and reposts · 1 reply
- May 30, 2025github.com/cloudflare/w... — @skorfmann.com5 likes and reposts
- Jun 3, 2025GitHub - cloudflare/workers-oauth-provider: OAuth provider library for Cloudflare Workers… — @tech-trending.bsky.social2 likes and reposts
- Jun 3, 2025🌐CloudlflareはClaudeでOAuthを構築し、すべてのプロンプトを公開します https://github.com/cloudflare/workers-oauth-provider/ via #HackerNews — @kdmsnr.com1 likes and repost
3 more on Bluesky
- Jun 3, 2025#Cloudlflare builds #OAuth with #Claude and publishes all the #prompts github.com/cloudflare/w... — @apardo.spluca.org1 likes and repost
- Jun 2, 2025"NOOOOOOOO!!!! You can't just use an LLM to write an auth library!" "haha gpus go brrr" github.com/cloudflare/w... — @bennyjamins.bsky.social1 likes and repost
- Jun 3, 2025Cloudlflare builds OAuth with Claude and publishes all the prompts View Article | Join the HN Conversation Summary of HN discussion 🧵👇… — @hncompanion.com0 likes and reposts · 1 reply
On Hacker News · 1
- Jun 2, 2025Cloudlflare builds OAuth with Claude and publishes all the prompts889 points · 529 comments
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
No KV migration exists or is needed.
- Distinctive: line 15
Search the project for each pattern below and apply the fix.
- Very specific: line 17
Keep OAuthProvider if the project uses it.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Upgrade @cloudflare/workers-oauth-provider to the latest 1.x
Reference (read the section for every hit): node_modules/@cloudflare/workers-oauth-provider/docs/migration-1.0.md.
Types and JSDoc: node_modules/@cloudflare/workers-oauth-provider/dist/oauth-provider.d.ts.
No KV migration exists or is needed; never edit stored data.
Procedure
- Note the installed version (
package.json). Skip guide sections tagged older than it. - Search the project for each pattern below and apply the fix.
- Bump to the latest
^1, install, typecheck, run tests. Construction errors quote the rule; grep the guide for the message. - Keep
OAuthProviderif the project uses it. Don't move toOAuthAuthorizationServer/OAuthResourceServerunless asked.
| Pattern in the project | Fix | Guide section |
new OAuthProvider( without resourceMetadata | add resourceMetadata: { resource } (ask the user for the value) | The canonical resource is required |
resourceMatchOriginOnly | delete | Removed: resourceMatchOriginOnly |
resolveExternalToken | return audience: <resource> | resolveExternalToken names its audience |
scopes_supported inside resourceMetadata | move to top-level requiredScopes | requiredScopes replaces resourceMetadata.scopes_supported |
allowImplicitFlow, allowPlainPKCE | delete; own clients must use code + S256 | Removed: the implicit grant and plain PKCE |
redirectUris / redirect URIs with http:// non-loopback or a custom scheme | https or loopback; native apps: allowPrivateUseRedirectUris: true | Redirect URIs must be HTTPS or loopback HTTP |
clientRegistrationTTL: 0; any *TTL below 60 | 0 → undefined; raise to ≥ 60 | Lifetimes are validated at construction |
userId: built with : (e.g. `${a}:${b}`) | encodeURIComponent(...), same value in listUserGrants/revokeGrant | User IDs cannot contain : |
revokeExistingGrantsBatchSize | delete | Removed: revokeExistingGrantsBatchSize |
imports of resourceMatches, validateResourceUri, isValidOAuthScopeToken, base64UrlToBytes, parseJwtJsonPart, getJwtCryptoAlgorithms | inline the logic; no replacement export | Internal helpers are no longer exported |
createClient( / updateClient( | only authorization_code/refresh_token/enabled grants, code responses; don't update CIMD clients | Client helpers validate what they store |
tokenExchangeCallback | OAuthError('invalid_grant') now revokes the grant; env is available; check returned TTLs | tokenExchangeCallback |
purgeExpiredData( | persist result.cursor, pass it back as cursor | purgeExpiredData() resumes from a cursor |
new OAuthAuthorizationServer( | drop authorizeEndpoint/tokenEndpoint if they equal ${issuer}/authorize, ${issuer}/oauth/token | OAuthAuthorizationServer endpoints have defaults |
ExchangeTokenOptions.aud, AuthRequest.resource as arrays | single strings | Type changes |
Ask the user, don't guess
- The canonical
resource(the URL MCP clients connect to; becomes the token audience). - On a multi-resource
OAuthAuthorizationServer:legacyGrantResource, the destination for pre-1.0 grants. Fixed once deployed. - Whether registered clients use remote
httpor custom-scheme redirect URIs (they stop authorizing), and whether any user IDs contain:. Neither shows up in a typecheck. - Whether DCR clients registered narrow
grant_types(now enforced). - Adopting optional features (role classes,
ctx.auth,insufficientScope, consent helpers,refreshTokenIdleTTL): offer, don't do unasked.
Verify
wrangler dev, thencurl -i http://localhost:8787<api route>:401whoseWWW-Authenticatehasresource_metadata="…/.well-known/oauth-protected-resource<resource path>".- With a loopback dev resource,
curl http://localhost:8787/.well-known/oauth-protected-resource<resource path>:200with the exactresource. Production serves it only on the resource's own origin. curl http://localhost:8787/.well-known/oauth-authorization-server<issuer path>:authorization_endpointandtoken_endpointunchanged from before the upgrade.OAuthProviderserves it at the origin root; anOAuthAuthorizationServerissuer's path goes after the prefix (RFC 8414 §3.1), e.g.…/oauth-authorization-server/tenantforhttps://example.com/tenant.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

