Learning-Bitcoin-from-the-Command-Line
A complete course for learning Bitcoin programming and usage from the command
- 3.4k
- Jupyter Notebook
- 11 d ago
Passkey-only identity for collaborative web apps on Cloudflare Workers and Durable Objects
Repo BlockchainCommons/passkey-cloudflare, read from GitHub 1 d ago. BlockchainCommons has not joined Take My Repo.
BlockchainCommons/passkey-cloudflare is a public repo on GitHub by BlockchainCommons. Passkey-only identity for collaborative web apps on Cloudflare Workers and Durable Objects. It declares the BSD-2-Clause-Patent license on GitHub. It is written mainly in TypeScript, has 3 stars and last changed on 2026-11-19. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-22.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
passkey-cloudflare is an identity library for web apps built on
Cloudflare Workers and Durable Objects, running on Workers Paid (not
Workers Free). It is being built as the identity layer for Blockchain
Commons' reference web apps, such as Collaborative Seed
Recovery and signing
coordinators for
FROST. It
demonstrates best practices for secret-key management with Blockchain
Commons technologies in a more mainstream web app.
The library answers only one question: which principal is presenting. Passkeys are the only credential. The application then decides what that principal may do. A person can hold several passkeys, recovery never falls back to passwords or email, and every failed ceremony gets the same response.
WebAuthn verification is done by
@simplewebauthn/server,
which leaves storage, sessions and recovery to the application. This
library is the rest of the identity layer: identity records and
passkeys kept in Durable Objects (no D1 or KV), sessions and step-up,
recovery codes, operator tools, rate limits, and the uniform refusal.
Live demo: A live demo is built alongside the library to show it in use. It is a placeholder today. It will become a shared canvas of cards that members edit together, with software agents acting for members under permissions they grant.
Forge: Open Integrity
Forge
(live demo) is an application
built on the library. It's a Git platform for agents in which only a
human's passkey can promote a change to main. It reuses this
library's sign-in, account settings and operator tools, and goes
further than the demo here: the person's passkey signs each commit of
main itself, as an OpenSSH webauthn-sk signature that stock git verify-commit checks. For that it needs a P-256 passkey, which is why
the library offers ES256 first at registration (#20).
These practices come from Christopher Allen's write-up of a running passkey system (see the gist) and from the WebAuthn Level 3 credential record.
able-acid-also), shown in the password manager beside the member name, so a person can tell their passkeys apart.The library proves that a request comes from someone holding a passkey bound to an identity record. It rests on these parties, each trusted for something different:
Two links are proven by cryptography: that a passkey belongs to this deployment's relying party ID (which, once a passkey is bound, cannot change without every ceremony being refused; see Deploying), and that an approval's digest was signed by that passkey. Which identity record a passkey belongs to is recorded only in the server's storage. Nothing links an identity record to a natural person, and with no attestation (see What Has Been Tested), nothing proves which authenticator holds a passkey. User verification is requested but not yet required by any ceremony; whether step-up and passkey creation should require it is an open question. See docs/security-model.md for each binding, what it rests on, and ways the same passkeys could prove more without the server.
passkey-cloudflare is meant to display the Gordian Principles, which are philosophical and technical underpinnings to Blockchain Commons' Gordian technology:
ur:seed URs that a person can keep in tools of their choosing.ur:seed UR. That is the text form iOS Gordian Seed Tool imports, so a person can keep their codes there.Passkey login works: registration, login (from the member-name field's passkey autofill too, on browsers without immediate mediation such as Safari), adding passkeys (steered to this device, another device or a security key) and revoking them, recovery codes and their rotation, step-up, and sessions, including logging out elsewhere or everywhere. Operators can look up a member or list every member, issue a rebind link, suspend and resume, remove, and allow a retired member name again, and every operator action is logged. The canvas, agents and signed artifacts come later. The API is not stable yet, and the library is not yet published to npm: use it from this repository.
Because it is in alpha, passkey-cloudflare should not be used for production tasks until it has had further testing and auditing. See Blockchain Commons' Development Phases.
Checked by hand on the deployed demo, September and October 2026:
The automated tests use a software authenticator (ES256 and Ed25519) inside the Workers runtime, and Playwright's Chromium with a virtual authenticator. The library's own dCBOR, Bytewords and Envelope encoders, the ur:seed text of recovery codes, and passkey labels are checked against test vectors made with Blockchain Commons' reference implementations, and its BIP39 words against the published BIP39 wordlist and the Trezor reference vectors. The base64url and CBOR helpers of @simplewebauthn/server, the WebAuthn library used for verification, are covered only indirectly, by the ceremony tests.
Not tested: Windows (including Windows Hello), Android, Linux and Firefox. Passkey autofill has been checked by hand only in Safari on macOS, on the deployed demo; Playwright checks only that it starts and is aborted, in Chromium with Safari's capabilities stubbed. Registration offers only ES256 and EdDSA, so an authenticator that supports only RS256, such as some older Windows Hello setups, may be unable to register. Registration asks for no attestation, so a deployment cannot limit which authenticator models may register.
docs/workers-free.md).Toward 0.1.0, we are tightening verification and refusal handling, running a second architecture review, writing architecture and recovery-code documentation, and cleaning up the repository and demo for others to use. An adversarial security review follows 0.1.0.
packages/passkey-cloudflare: the library. It deploys inside an application's own Worker. It has five entry points:createPasskeys, which runs the ceremonies, the Durable Object classes an application binds (listed in PASSKEY_DURABLE_OBJECTS), and the building blocks around them, such as rate limits, member names, passkey labels, session cookies and the uniform refusal./browser: the browser half of each ceremony. It turns the options-JSON that the application fetched into a WebAuthn call and returns the response JSON to post back, and makes no requests of its own./gordian: hand-written dCBOR, Bytewords and Envelope encoders, the ur:seed form recovery codes take, and their BIP39 words./ssh: OpenSSH forms of a passkey and an approval: an ES256 passkey's sk-ecdsa-sha2-nistp256@openssh.com public key, the SSHSIG data an application passes as the approval digest, and the armored webauthn-sk-ecdsa-sha2-nistp256@openssh.com signature the approval becomes, which ssh-keygen -Y verify and git verify-commit check./testing: a software authenticator for tests, which must never be used as a real authenticator.apps/demo: the demo Worker, deployed at https://passkeydemo.gordianstack.com: a placeholder app with sign-in and settings in panes over it. An app can copy those panes and restyle them: see docs/demo-panes.md.Docs include:
CONTEXT.md: Vocabularydocs/adr/: Architectural decisionsdocs/demo-panes.md: Copying and restyling the demo's panesdocs/refusal-floor.md: How the refusal timing floor is measureddocs/security-model.md: What each binding of a passkey to an identity record rests on, and ways the same passkeys could prove more without the serverdocs/workers-free.md: CPU time per request, and why Workers Free is not enoughThe test scripts run TypeScript files directly, which needs Node 23.6 or later.
npm install
npm test # the demo's HTTP surface inside the Workers runtime, a check of the deployed bundle, then ssh-keygen on the SSH signatures
npm run typecheck
npx playwright install chromium # once
npm run test:e2e -w demo # the browser smoke test, against wrangler dev
The Workers that Playwright and the refusal-floor measurement run are never deployed as the demo. They also name operators by member name, in the OPERATOR_MEMBER_NAMES var, so their tests need no secret, and raise every rate limit too high to refuse, so runs from one address are not throttled. That code is left out of the demo's own entry point, apps/demo/src/index.ts, and npm test checks that the deployed bundle does not contain it.
To run the demo locally, the relying party must match the page's origin, and --local-upstream must name the local host. Without it, the demo's custom-domain route rewrites each request's Origin to the deployed domain, and every ceremony is refused as "origin not allowed":
cd apps/demo
npx wrangler dev --local-upstream localhost:8787 --var RP_ID:localhost --var ORIGIN:http://localhost:8787
The library needs Workers Paid. On Workers Free, whose limit is 10 ms of CPU time per request, the first passkey verification on each new isolate can exceed that limit and be refused: see docs/workers-free.md.
Every refused ceremony waits until the timing floor, REFUSAL_FLOOR_MS, has passed. It is set from measurements of a deployed Worker: see docs/refusal-floor.md for how to repeat them.
Every passkey is bound to the relying party ID, the RP_ID var. When a deployment binds its first passkey, the library stores that RP ID, and keeps it while any passkey is bound. If RP_ID is changed after that, every ceremony ends in the uniform refusal: browsers offer none of the existing passkeys, and no new one can be registered. The Worker logs an error naming both RP IDs, and the ceremony failure log records the cause rp-id-changed (unlike wrong-rp-id, which is one passkey response made for another RP ID). Passkeys cannot be moved to a new RP ID. Either restore the old value, or deploy on fresh storage and register again.
Every per-source rate limit keys on the request's source address, which the library reads from the CF-Connecting-IP header that Cloudflare's edge sets. Where that header does not reach the application, such as behind a Worker that rebuilds the request or on self-hosted workerd behind a reverse proxy, pass sourceOf to createPasskeys: a function that returns the request's source address, for example from the proxy's X-Forwarded-For. When it returns no address, every ceremony and every options request ends in the uniform refusal, rather than all callers sharing one set of limits. The Worker logs an error once per isolate, and a refused ceremony records the cause source-unknown in the ceremony failure log.
A session lasts 7 days from the ceremony that started it, used or not; nothing extends it. To change that, pass sessionLifetimeMs to createPasskeys, at most 30 days (MAX_SESSION_LIFETIME_MS): createPasskeys throws on a longer lifetime, or one that is not a positive whole number of milliseconds. Every session the deployment mints then lasts that long, and passkeys.sessionCookie(value) gives the session cookie a Max-Age that agrees. The step-up window stays 10 minutes whatever the session lifetime.
Operators are listed by identity record id, separated by commas, in the OPERATOR_RECORD_IDS secret: npx wrangler secret put OPERATOR_RECORD_IDS. Locally, put it in apps/demo/.dev.vars.
A deployment on fresh storage starts with no operator, since record ids are new. To set one up:
apps/demo, run npx wrangler secret put OPERATOR_RECORD_IDS and paste it.GET /me answers "operator": true.This is a project of Blockchain Commons. We are proudly a "not-for-profit" social benefit corporation committed to open source & open development. Our work is funded entirely by donations and collaborative partnerships with people like you. Every contribution will be spent on building open tools, technologies, and techniques that sustain and advance blockchain and internet security infrastructure and promote an open web.
To financially support further development of this and other projects, please consider becoming a Patron of Blockchain Commons through ongoing monthly patronage as a GitHub Sponsor. You can also support Blockchain Commons with bitcoins at our BTCPay Server.
We encourage public contributions through issues and pull requests! Please review CONTRIBUTING.md for details on our development process. All contributions to this repository require a GPG signed Contributor License Agreement.
The best place to talk about Blockchain Commons and its projects is in our GitHub Discussions areas:
As an open-source, open-development community, Blockchain Commons does not have the resources to provide direct support of our projects. Please consider the discussions area as a locale where you might get answers to questions. Alternatively, please use this repository's issues feature. Unfortunately, we can not make any promises on response time.
If your company requires support to use our projects, please feel free to contact us directly about options. We may be able to offer you a contract for support from one of our contributors, or we might be able to point you to another entity who can offer the contractual support that you need.
The following people directly contributed to this repository. You can add your name here by getting involved. The first step is learning how to contribute from our CONTRIBUTING.md documentation.
| Name | Role | Github | GPG Fingerprint | |
|---|---|---|---|---|
| Christopher Allen | Principal Architect & Engineer | @ChristopherA | <ChristopherA@LifeWithAlacrity.com> | FDFE 14A5 4ECB 30FC 5D22 74EF F8D3 6C91 3574 05ED |
Commits are signed with SSH keys. Christopher Allen's current SSH signing keys are listed at https://api.github.com/users/ChristopherA/ssh_signing_keys.
We want to keep all of our software safe for everyone. If you have discovered a security vulnerability, we appreciate your help in disclosing it to us in a responsible manner. We are unfortunately not able to offer bug bounties at this time.
We do ask that you offer us good faith and use best efforts not to leak information or harm any user, their data, or our developer community. Please give us a reasonable amount of time to fix the issue before you publish it. Do not defraud our users or us in the process of discovery. We promise not to bring legal action against researchers who point out a problem provided they do their best to follow these guidelines.
Please report suspected security vulnerabilities in private via email to ChristopherA@BlockchainCommons.com (do not use this email for support). Please do NOT create publicly viewable issues for suspected security vulnerabilities.
The following keys may be used to communicate sensitive information to developers:
| Name | Fingerprint |
|---|---|
| Christopher Allen | FDFE 14A5 4ECB 30FC 5D22 74EF F8D3 6C91 3574 05ED |
You can import a key by running the following command with that individual's fingerprint: gpg --recv-keys "<fingerprint>" Ensure that you put quotes around fingerprints that contain spaces.
Unless otherwise noted (either in this /README.md or in the file's header comments) the contents of this repository are Copyright © 2026 by Blockchain Commons, LLC, and are licensed under the spdx:BSD-2-Clause Plus Patent License.
BlockchainCommons/passkey-cloudflare is a public repo on GitHub by BlockchainCommons. Passkey-only identity for collaborative web apps on Cloudflare Workers and Durable Objects.
It declares the BSD-2-Clause-Patent license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-11-19. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
A complete course for learning Bitcoin programming and usage from the command
A beautiful method of hash visualization based on Conway’s Game of Life: reference library in Swift
Discussions of Gordian principles, Gordian specifications, Gordian references, and making it all a reality.
Take My Repo has not tested this on your machine. Requirements come from the project's own documentation.