# Minimal NIST/OWASP-compliant auth implementation for Cloudf…

This is an educational reference implementation showing how to build reasonably secure, standards-compliant authentication from first principles on Cloudflare Workers. Stack: Hono, Turso (libSQL), PBKDF2-SHA384 + normalization + common-password checks, JWT access + refresh tokens with revocation su…

- **Page:** https://magpie.gallery/i/minimal-nist-owasp-compliant-auth-implementation-f-fevn
- **Type:** Link to an idea elsewhere
- **Category:** AI & dev
- **Tags:** auth, cloudflare-workers, jwt, security, reference

## Source

Web · vhsdev: Minimal NIST/OWASP-compliant auth implementation for Cloudflare Workers

- **Original:** https://news.ycombinator.com/item?id=46944084

> This is an educational reference implementation showing how to build reasonably secure, standards-compliant authentication from first principles on Cloudflare Workers. Stack: Hono, Turso (libSQL), PBKDF2-SHA384 + normalization + common-password checks, JWT access + refresh tokens with revocation support, HTTP-only SameSite cookies, device tracking. It's deliberately minimal — no OAuth, no passkeys, no magic links, no rate limiting — because the goal is clarity and auditability. 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 / SP 800-132 and OWASP guidance. For production I'd almost always reach for Better Auth instead (https://www.better-auth.com) — this repo is not trying to compete with it. Live demo: https://private-landing.vhsdev.workers.dev/ Repo: https://github.com/vhscom/private-landing Happy to answer questions about the crypto choices, the refresh token revocation pattern, Turso schema, constant-time comparison, unicode pitfalls, etc. https://github.com/vhscom/private-landing

## GitHub projects

- https://github.com/vhscom/private-landing

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
