leopoldsw

Self-deployed auth for Cloudflare Workers and D1: email/password login, magic links, verification, password reset, secure sessions, CLI setup, and production-ready defaults.

20
1
100% credibility
Found May 14, 2026 at 20 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

An open-source kit for adding self-hosted email/password authentication, magic links, email verification, and password resets to Cloudflare Workers applications using D1 storage.

How It Works

1
πŸ” Discover secure logins

You find a free tool that makes adding sign-ups and logins to your website super simple and safe.

2
πŸ“¦ Start your app

You create a new folder for your login system using a ready-made template that sets everything up quickly.

3
πŸ’Ύ Set up storage

You prepare a safe place to store user info, like emails and passwords, all protected in your own account.

4
πŸ“§ Connect email

You link an email service so users get magic links or reset instructions right to their inbox.

5
πŸ§ͺ Test on your computer

You run it locally to see sign-ups, logins, and emails working perfectly before going live.

πŸš€ Go live securely

Your website now has working logins, and users feel safe signing up and coming back anytime.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 20 to 20 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is cloudflare-auth?

Cloudflare-auth is a TypeScript kit for self-hosted authentication in Cloudflare Workers and D1 databases, handling email/password login, magic links, email verification, password resets, and secure sessions. Developers get a full auth service via CLI commands like `cf-auth init`, `migrate`, and `deploy`, with production-ready defaults for Hono or plain Workers apps. It keeps user data, secrets, and emails in your Cloudflare account, solving the need for lightweight, owned cloudflare auth code without external providers.

Why is it gaining traction?

Unlike cloudflare Auth0 or Authentik, it runs entirely on Workers with D1-backed sessions and opaque tokens, dodging vendor lock-in and "cloudflare authentication not working" headaches from misconfigs. The CLI automates scaffolding, diagnostics via `cf-auth doctor`, and deploys, while terminal emails speed local dev. Magic links and password flows come with rate limits and origin checks out-of-box, making cloudflare authentication methods reliable for edge apps.

Who should use this?

Cloudflare Workers devs building SaaS backends or APIs needing quick email/password auth with magic links. Hono users wanting protected routes without boilerplate, or solo devs avoiding cloudflare authkey complexity in multi-tenant setups. Ideal if you're already on Cloudflare and hate managing separate auth services.

Verdict

Try it for Cloudflare-native appsβ€”CLI and defaults cut setup time, but 20 stars and 1.0% credibility score signal early maturity; docs are solid, but expect light testing. Solid for prototypes, monitor for production scale.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.