worker-auth-providers is an open-source library providing authentication providers for Cloudflare Workers. The current version is 0.0.14-beta.10, released as a beta with irregular cadence. It supports OAuth and OTP authentication for providers like GitHub, Google, Facebook, Discord, Spotify, Twilio, Mailgun, SendGrid, and AWS SNS. Designed specifically for Cloudflare Workers, it is lightweight with minimal dependencies. Key differentiators vs. alternatives like Auth0 or Passport.js: it runs at the edge with no external server, is framework-agnostic, and uses KV storage for OTPs. Types included.
npm install worker-auth-providersVerified import paths — ran on the pinned version, not inferred.
Demonstrates GitHub OAuth login redirect and user retrieval in a Cloudflare Worker.
Pin to an exact version and update carefully.
Check documentation for Apple export availability.
Bind a KV namespace to WORKER_AUTH_PROVIDERS_STORE in wrangler.toml.
Use TypeScript to validate options at compile time.
Ensure options object is passed: github.redirect({ options: { clientId: 'YOUR_CLIENT_ID' } })Add kv_namespaces binding: [[kv_namespaces]] binding = "WORKER_AUTH_PROVIDERS_STORE" id = "your-kv-namespace-id"
Use import syntax or set "type": "module" in package.json.
No dependency data recorded yet.