Skip to content

fix(auth): passkey sign-in polish #271

Open

Description

@PiquelChips

Problem

  • Autofill is advertised but never used. The handle input has autocomplete="username webauthn" (crates/ui/src/form.rs:637) and the conditional-ui feature is on, but mediation is None (apps/auth-service/src/passkey/mod.rs:640) and the script never asks for conditional mediation.
  • Ghost passkeys. A failed signup or enrollment finish leaves the new passkey in the password manager, and removed passkeys stay too; the script never calls signalUnknownCredential or signalAllAcceptedCredentials (assets/passkey.js:120-157, 297-320).
  • One message for every error. Every DOMException reads "cancelled or unavailable", including InvalidStateError, which means this device already has a passkey for the account (passkey.js:52-57). Two overlapping sign-ins with a counter-based key show the "copied passkey" message, which tells the owner to use another passkey although retrying works (passkey/error.rs:179).
  • Display names accept direction overrides and zero-width characters: only char::is_control is rejected (passkey/types.rs:57-63).
  • The invitation token travels in the query string (/register?invitation=, admin/service.rs:590), unlike every other token, which uses the fragment.
  • Deleting requires the handle typed exactly; "@alice" or "Alice" is refused (deletion/mod.rs:271).
  • Tabs break each other. Each GitHub or Google start makes a new browser binding for the same cookie, so starting both in two tabs breaks the first (federation/mod.rs:299).

Proposal

Fix each: conditional mediation on /login; the Signal API after failures and on settings; specific messages; reject Unicode format characters (Cf); the invitation in the fragment; normalize the typed handle; reuse an existing browser binding.

Done when

  • Each item has a test or a browser check.

Note

Written by Claude Opus 5.5 in Claude Code, from a review by Claude Opus 5.5 and GPT 6.1 Sol (via T3 Code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apps/auth-serviceOrigin Auth at auth.sourceorigin.dev, its settings and developer console, and the operator CLIenhancementNew feature or request

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions