frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Minimal NIST/OWASP-compliant auth implementation for Cloudflare Workers

https://github.com/vhscom/private-landing
20•vhsdev•3h ago
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.

Comments

TheTaytay•2h ago
Thank you for writing/publishing this. I especially appreciate the prominent warning at the top not to mistake it for a production library and to suggest an alternative. (It’s surprising to me how often people forget to add disclaimers like that to their code.)
vhsdev•2h ago
Appreciate it, TheTaytay!
usefulposter•2h ago
Oy.

Who specifically is this intended for? It's a wonder that the model didn't spice things up with some tangential compliance catnip like FIPS or PCI DSS.

I would be curious to see the prompts used to create this.

Recently, I don't think there could be a better example of applicability of Brandolini's law.

vhsdev•2h ago
Everything you or your agent need to see is in the commit history.
amichal•1h ago
I would love to see alternatives of educational code that implements these things in a "compliant" way.

Security does not come from Compliance (sometimes they are at odds) but as someone who is not an academically trained security professional but who has read NIST* in detail, implements such code and has passed a number of code reviews from security professionals. And who has been asked to do things like STRIDE risk assessment on products I write code for I do appreciate the references and links along side actual code of any kind.

Now to be fair, I have not yet looked at any of the code here, it's commit history or its level of AI-induced fantasy confidence in the validity of the specific solutions. That could be good or bad but the intent of this is really on point for me.

Edit: I looked at some code:

This is missing a lot from NIST SP 800-63B

Looking at https://github.com/vhscom/private-landing/blob/main/packages...

    - the db select runs before the password has so you can detect if the account exists with timing attacks
    - there is no enforced minimum nor maximum length on the stored secret (e..g para 5.1.1.1 and 5.1.1.2 recommend length range of 8 to 64 unicode printable chars normalized to some form i forget)

    - there is no enforced min max length on the account identifier (in this case email) and no normalization
At least not in the code i saw. so there is still a lot of basics/low hanging fruit from NIST recommendations at least you would find in any production grade auth framework missing
vhsdev•57m ago
Hi, amichal. Nice finds. I will dig into more of the particulars where sensible. Please feel free to send up a pull request! Thanks for taking a peek.
vhsdev•52m ago
Pretty sure all those are covered, upon more careful review. PRs open!

Edit: The create account I hadn't thought of for the email enum. Thanks!

chrisweekly•1h ago
Brandolini's law, aka the bullshit assymetry principle: it takes way more effort to refute bs than to create it.

FTR I'm not commenting on whether the posted project is bs, just clarifying the meaning of your last sentence.

Show HN: Algorithmically Finding the Longest Line of Sight on Earth

https://alltheviews.world
195•tombh•5h ago•73 comments

Show HN: Browse Internet Infrastructure

https://www.wirewiki.com
78•pul•2h ago•15 comments

Show HN: Minimal NIST/OWASP-compliant auth implementation for Cloudflare Workers

https://github.com/vhscom/private-landing
20•vhsdev•3h ago•8 comments

Show HN: Printable Classics – Free printable classic books for hobby bookbinders

https://printableclassics.com
11•bookman10•3h ago•0 comments

Show HN: A custom font that displays Cistercian numerals using ligatures

https://bobbiec.github.io/cistercian-font.html
137•bobbiechen•16h ago•28 comments

Show HN: A Satellite View for Python Code

https://ast-visualizer.com/
5•treeliker•1h ago•6 comments

Show HN: PlaceboGPT – 7,666-parameter medical AI with one answer for everything

https://www.pharmatools.ai/placebogpt
3•nicklamb•1h ago•3 comments

Show HN: I created a Mars colony RPG based on Kim Stanley Robinson’s Mars books

https://underhillgame.com/
263•ariaalam•22h ago•87 comments

Show HN: Slack CLI for Agents

https://github.com/stablyai/agent-slack
91•nwparker•3d ago•28 comments

Show HN: Ported the 1999 game Bugdom to the browser and added a bunch of mods

https://reallyeli.com/bugdom/Bugdom.html
15•reallyeli•12h ago•1 comments

Show HN: Emergent – Artificial life simulation in a single HTML file

https://emergent-ivory.vercel.app/
14•usernameis42•16h ago•0 comments

Show HN: GitWriter – mobile Markdown editor for writers

https://gitwriter.io
2•anthonybrooks•6h ago•0 comments

Show HN: Agentseed – Generate Agents.md from a Codebase

https://github.com/avinshe/agentseed
7•avinshe•9h ago•1 comments

Show HN: ArkWatch – Uptime monitoring with zero dependencies

2•arkforge•6h ago•1 comments

Show HN: Horizons – OSS agent execution engine

https://github.com/synth-laboratories/Horizons
38•JoshPurtell•3d ago•6 comments

Show HN: LocalGPT – A local-first AI assistant in Rust with persistent memory

https://github.com/localgpt-app/localgpt
322•yi_wang•1d ago•150 comments

Show HN: Poisson – Chrome extension that buries your browsing in decoy traffic

https://github.com/Daring-Designs/poisson-extension
6•daringdesigns•16h ago•0 comments

Show HN: It took 4 years to sell my startup. I wrote a book about it

https://derekyan.com/ma-book/
203•zhyan7109•4d ago•67 comments

Show HN: Smooth CLI – Token-efficient browser for AI agents

https://docs.smooth.sh/cli/overview
106•antves•3d ago•71 comments

Show HN: Physical swipe typing for your computer

https://github.com/ZimengXiong/swipeType
2•zimengx•10h ago•0 comments

Show HN: WhatsApp Chat Viewer – exported chats as HTML

https://github.com/rodrigodesalvobraz/whatsapp-chat-viewer
3•rodrigobraz•15h ago•0 comments

Show HN: Frop – AirDrop alternative for any device (no app required)

https://frop.mmynk.com
3•cueo•11h ago•3 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
324•isitcontent•2d ago•40 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
391•eljojo•2d ago•227 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
90•phreda4•2d ago•17 comments

Show HN: WrapClaw – a managed SaaS wrapper around Open Claw

3•kushagraagent•17h ago•2 comments

Show HN: A luma dependent chroma compression algorithm (image compression)

https://www.bitsnbites.eu/a-spatial-domain-variable-block-size-luma-dependent-chroma-compression-...
58•mbitsnbites•5d ago•9 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
383•vecti•2d ago•176 comments

Show HN: Fine-tuned Qwen2.5-7B on 100 films for probabilistic story graphs

https://cinegraphs.ai/
96•graphpilled•1d ago•20 comments

Show HN: Artifact Keeper – Open-Source Artifactory/Nexus Alternative in Rust

https://github.com/artifact-keeper
165•bsgeraci•3d ago•67 comments