Commit Graph
3 Commits
Author SHA1 Message Date
weishu 75aa277aac feat(auth): sign in to native apps with a single passkey ceremony
Hub discovery required two authenticator prompts plus a confirm step:
a local locator-only ceremony to read the Hub from the user handle, then a
Hub-issued login challenge. Native apps now sign their own fresh challenge
{v:2, operation:"login", channel:"native", iat, nonce}, read the Hub from
the selected credential's v2 user handle, and post the assertion straight to
POST /api/passkey/login/verify.

- hub: accept native self-issued challenges only within
  [now-5min, now+1min] and only once (replay guard keyed on the challenge,
  claimed synchronously after verification); remove
  /api/passkey/login/options. Browser ceremonies keep Hub-issued challenges.
- shared: createPasskeyNativeLoginChallenge / parsePasskeyNativeLoginChallenge;
  drop discovery helpers.
- ios/android: one system sheet from the pairing screen; manual Hub entry
  for long-address handles or an explicit Hub, which must match the
  credential before anything is sent. Assertions are only posted to the Hub
  named by the credential.
- web: revert address-free discovery; the web app signs in to its own Hub.
- docs: native single-ceremony contract and its security trade-off.
2026-11-17 15:09:53 +08:00
weishu c63dc4e043 feat(auth): discover Hub from passkeys across web and native 2026-11-17 13:09:07 +08:00
weishu ee3d7eed4c feat(auth): share passkeys across web and native apps
Use auth.hapi.run as the shared RP with an isolated static browser bridge, Hub-bound challenges and accounts, and one-time PKCE code exchange.

Update iOS and Android validation, app associations, deployment documentation, and bidirectional browser regression coverage.
2026-11-17 11:39:01 +08:00