Image missing.
Cloudlflare builds OAuth with Claude and publishes all the prompts

created: June 2, 2025, 2:24 p.m. | updated: June 3, 2025, 8:15 p.m.

OAuth 2.1 Provider Framework for Cloudflare WorkersThis is a TypeScript library that implements the provider side of the OAuth 2.1 protocol with PKCE support. The OAuth provider will check the access token on these requests, // and then, if the token is valid, send the request to the API handler. // Example: // apiHandlers: { // "/api/users/": UsersApiHandler, // "/api/documents/": DocumentsApiHandler, // "https://api.example.com/": ExternalApiHandler, // }, // Any requests which aren't API request will be passed to the default handler instead. async fetch ( request : Request , env , ctx ) { let url = new URL ( request . upstreamRefreshToken } , // Optionally override the default access token TTL to match the upstream token accessTokenTTL : upstreamTokens .

6 days, 4 hours ago: Hacker News