Skip to content

feat(auth): add required passkey verification - #1970

Merged
ascorbic merged 2 commits into
feat/delegated-release-servicefrom
feat/delegated-release-service-12-passkey-uv
Jul 12, 2026
Merged

ascorbic merged 2 commits into
feat/delegated-release-servicefrom
feat/delegated-release-service-12-passkey-uv

Conversation

@ascorbic

@ascorbic ascorbic commented Jul 12, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Implements W3.6 from the delegated release plan. It adds configurable WebAuthn user verification and typed, versioned challenge contexts, with required UV enforced during both registration and authentication verification and atomic challenge consumption for context-bound ceremonies. Existing CMS behavior remains preferred by default.

Part of #1908 and implements the approved protocol in #1870.

Closes: N/A, integration work for #1908.

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • User-visible strings in the admin UI are wrapped for translation (if applicable). Do not include messages.po changes except in translation PRs. N/A: no admin UI changes.
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion. N/A: maintainer-owned implementation of approved RFC RFC: Attested Automated Publishing #1870 under umbrella Delegated release service #1908.

AI-generated code disclosure

  • This PR includes AI-generated code, model/tool: OpenCode with GPT-5.6-sol plus independent adversarial and review agents.

Screenshots / test output

No visual changes.

  • Full monorepo build and typecheck pass.
  • Auth package: 80 tests pass.
  • Type-aware lint reports 0 diagnostics.
  • Formatting and diff checks pass.
  • Publint passes; attw crashes internally with Cannot read properties of undefined (reading 'filename').

Try this PR

Open a fresh playground →

A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state. Try the admin, edit content, hit the public site.

Tracks feat/delegated-release-service-12-passkey-uv. Updated automatically when the playground redeploys.

@changeset-bot

changeset-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 360dffb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@emdash-cms/auth Minor
@emdash-cms/auth-atproto Patch
emdash Minor
@emdash-cms/cloudflare Minor
@emdash-cms/sandbox-workerd Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/do-demo-site Patch
@emdash-cms/do-solo-demo-site Patch
@emdash-cms/admin Minor
@emdash-cms/blocks Minor
@emdash-cms/gutenberg-to-portable-text Minor
@emdash-cms/x402 Minor
create-emdash Minor
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the review/needs-review No maintainer or bot review yet label Jul 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 825 lines across 9 files. Large PRs are harder to review and more likely to be closed without review.

If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs.

See CONTRIBUTING.md for contribution guidelines.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
emdash-demo-do 360dffb Jul 12 2026, 08:13 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
emdash-demo-cache 360dffb Jul 12 2026, 08:13 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-playground 360dffb Jul 12 2026, 08:13 AM

@emdashbot emdashbot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR implements the right slice of the delegated release plan: configurable WebAuthn user verification (preferred/required/discouraged) plus typed, versioned challenge contexts bound to ceremonies via SHA-256 digests. It fits cleanly into the existing @emdash-cms/auth passkey module, keeps the CMS default at preferred, and requires atomic challenge consumption whenever a context is used — which avoids the replay/TOCTOU issue that would otherwise undercut the feature.

What I checked:

  • Read the full diff and every changed file in packages/auth/src/passkey/.
  • Traced the context binding/unbinding flow in challenge-context.ts (canonical serialization, type/version checks, digest verification).
  • Verified UV wiring into registration/authentication options and enforcement in response verification.
  • Checked overloads on verifyAuthenticationResponse and verifyRegistrationResponse; the existing 3- and 4-argument call signatures remain supported.
  • Confirmed AtomicChallengeStore is only required when a context codec is supplied, and that a non-atomic store still falls back to get/delete for plain ceremonies.
  • Searched the tree for consumers; this change is self-contained in @emdash-cms/auth.

I found no logic bugs, security issues, regressions, or AGENTS.md violations. The changeset is present and correctly scoped to @emdash-cms/auth. Tests cover UV behavior, context round-trips, atomic-store requirements, and context-digest mismatch.

Headline: approve — clean implementation, no blocking findings.

@github-actions github-actions Bot added review/approved Approved; no new commits since and removed review/needs-review No maintainer or bot review yet labels Jul 12, 2026
@ascorbic
ascorbic merged commit 5b8ae32 into feat/delegated-release-service Jul 12, 2026
8 of 10 checks passed
@ascorbic
ascorbic deleted the feat/delegated-release-service-12-passkey-uv branch July 12, 2026 08:18
@ascorbic ascorbic mentioned this pull request Jul 12, 2026
37 of 63 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant