{"by":"vhsdev","descendants":10,"id":46944084,"kids":[46944778,46944804,46949106,46944095],"score":33,"text":"This is an educational reference implementation showing how to build reasonably secure, standards-compliant authentication from first principles on Cloudflare Workers.<p>Stack: Hono, Turso (libSQL), PBKDF2-SHA384 + normalization + common-password checks, JWT access + refresh tokens with revocation support, HTTP-only SameSite cookies, device tracking.<p>It&#x27;s deliberately minimal — no OAuth, no passkeys, no magic links, no rate limiting — because the goal is clarity and auditability.<p>I wrote it mainly to deeply understand edge-runtime auth constraints and to have a clean Apache-2.0 example that follows NIST SP 800-63B &#x2F; SP 800-132 and OWASP guidance.<p>For production I&#x27;d almost always reach for Better Auth instead (<a href=\"https:&#x2F;&#x2F;www.better-auth.com\">https:&#x2F;&#x2F;www.better-auth.com</a>) — this repo is not trying to compete with it.<p>Live demo: <a href=\"https:&#x2F;&#x2F;private-landing.vhsdev.workers.dev&#x2F;\" rel=\"nofollow\">https:&#x2F;&#x2F;private-landing.vhsdev.workers.dev&#x2F;</a><p>Repo: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;vhscom&#x2F;private-landing\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;vhscom&#x2F;private-landing</a><p>Happy to answer questions about the crypto choices, the refresh token revocation pattern, Turso schema, constant-time comparison, unicode pitfalls, etc.","time":1770636606,"title":"Show HN: Minimal NIST/OWASP-compliant auth implementation for Cloudflare Workers","type":"story","url":"https://github.com/vhscom/private-landing"}