Skip to content

feat(console): make passkeys public and add a passkey sign-in button - #14400

Merged
ChiragAgg5k merged 2 commits into
mainfrom
feat/console-passkeys-public
Oct 12, 2026
Merged

ChiragAgg5k merged 2 commits into
mainfrom
feat/console-passkeys-public

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Makes passkeys public in the Console, ahead of the passkeys announcement and docs (#14389).

  • Removes the passkeys rollout flag. The flags-passkeys account pref and the passkeysFlag profile feature no longer gate anything. Every Console user now sees the project passkey policy, the Passkey auth method, account passkeys, and their command center and settings search entries. The flag's Debug menu toggle and prefs catalog entry are gone too.
  • Adds a "Sign in with a passkey" button to the sign-in page, between the OAuth row and the email form, following the design. It opens the browser's passkey prompt. Before this, passkeys only appeared in the email field's autofill, which is easy to miss.
    • The browser allows one WebAuthn request at a time, so the button aborts the autofill request first. If the prompt ends without a session, autofill starts again.
    • When the user dismisses the prompt, nothing is shown. Other errors use the existing passkey sign-in messages.
    • The "Last used" badge moves to the passkey button when the last sign-in used a passkey.
    • The button is hidden on sign-up and in browsers without WebAuthn.
    • Hebrew and Japanese strings are added.

Cloud's task-manage-flags still accepts passkeys. The Console doesn't read it anymore, so it can be removed there whenever convenient.

Test plan

End to end against a real backend. I ran a local Appwrite stack from this branch with the dev Console, in Chromium with a virtual platform authenticator:

  1. Signed up and signed in with a password, then added a passkey from Account → Security.
  2. Signed out. The sign-in page showed the new button.
  3. Clicked the button with no matching passkey on the device. The prompt failed quietly: no toast, still on /sign-in, and autofill came back.
  4. Clicked the button with the passkey. The Console sent POST /account/tokens/passkey, PUT /account/tokens/passkey and POST /account/sessions/token, and the session came back with provider: passkey and factors passkey, userVerification. It then landed on the redirect target.
  5. Signed out again. The passkey button showed Last used.
Sign-in page Prompt open (form disabled)
Sign-in page Prompt open
Signed in with the passkey Passkey marked last used
Signed in Last used
Passkey added from account security
Passkey added

Automated tests

  • e2e/console.mocked.passkeys.spec.ts now holds all passkey e2e coverage as five flow tests, down from 18 tests in two files: signing in with the button (with a virtual authenticator credential, a dismissed prompt, and no button on sign-up); Cloud users managing the relying party with no rollout flag; turning passkeys on through the domain dialog on self-hosted; local development with a localhost platform; and Android signing certificates.
  • bun run test:unit (537 passed), ESLint, Prettier, lint:content, and both i18n audits are clean.

Related: appwrite-labs/cloud#5805

Passkeys are ready for everyone, so the Cloud rollout flag (`flags-passkeys` pref and the `passkeysFlag` profile feature) no longer gates the project passkey policy, the Passkey auth method, account passkeys or their command center entries.

The sign-in page gets a "Sign in with a passkey" button that opens the browser's passkey prompt. Autofill only offers passkeys from the email field, which is easy to miss; the button makes the method visible. The browser runs one WebAuthn request at a time, so the button aborts the autofill request and autofill comes back if the prompt ends without a session.
@luxor-code-review

luxor-code-review Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review complete. 🟡 1 medium

💬 Inline comments (1)

  • 🟡 Optional passkey path ignores the 429 rate-limit ref — sign-in.tsx:326
🧹 Nitpicks (2) — 🟢 2 low
  • 🟢 Add the new Or key to locale dictionaries (SignIn.tsx:501) — The sign-in divider now renders t('Or') when the passkey button is shown, while the previous label used t('Or continue with') (apps/console/src/components/global/auth/SignIn.tsx:501).
  • 🟢 Fallback mock returns 404 with a 401 error body (console.mocked.passkey-sign-in.spec.ts:88) — The catch-all fallback returns HTTP 404 for non-/account paths but always serializes code: 401, type: 'general_unauthorized_scope' (apps/console/e2e/console.mocked.passkey-sign-in.spec.ts:88), so a 404 response claims a 401 auth error — unlike the real API, which returns a status-matched error type.

The change removes the flags-passkeys rollout flag and its gating, exposing passkey management and a passkey sign-in button unconditionally.

Files Change
src/lib/passkeys.ts, src/hooks/, src/lib/prefs-catalog.ts, src/lib/user-prefs-keys.ts, src/lib/console-profiles.ts Delete the passkeys flag plumbing and prefs key; passkey capability checks remain for conditional UI
src/routes/_auth/sign-in.tsx, src/components/global/auth/SignIn.tsx Add a passkey sign-in button with optional-mediation flow, 429 handling, and an Or divider
src/routes/_public/**, src/components/pages/** Unconditionally render the passkeys security/policies sections and route; add the passkeys policies route
src/components/global/shared/CommandCenter.tsx, src/lib/command-center/** Remove the passkeys field from CommandContext and make the related entries always available
src/components/global/providers/DebugMenu.tsx Drop the passkeys flag from the debug menu list
src/lib/i18n/dictionaries/{he,ja}/account-global.ts Add the Sign in with a passkey translation strings
e2e/console.mocked.passkeys.spec.ts, e2e/console.mocked.passkey-sign-in.spec.ts Add mocked e2e coverage for passkey management and sign-in with a CDP virtual authenticator

Reviewed commit: 7aec89d

@ChiragAgg5k ChiragAgg5k self-assigned this Oct 12, 2026
@ghost

ghost commented Oct 12, 2026

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

This change removes the Console passkey rollout-flag gates so account and project passkey settings are available to all users. It also adds a passkey sign-in button that uses optional WebAuthn mediation while preserving conditional email autofill, with mocked browser/API coverage for sign-in and cancellation.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 23
File Change
apps/console/e2e/console.mocked.passkey-sign-in.spec.ts Adds mocked-API E2E coverage for passkey-button sign-in, cancellation, and sign-up visibility.
apps/console/e2e/console.mocked.passkeys.spec.ts Updates passkey settings coverage to expect visibility for Cloud users without a rollout flag.
apps/console/src/components/global/auth/SignIn.tsx Adds the passkey sign-in button, divider, and last-used badge.
apps/console/src/components/global/providers/DebugMenu.tsx Removes the passkey rollout-flag debug control and its profile feature reference.
apps/console/src/components/global/shared/CommandCenter.tsx Removes passkey-availability state from command-center context.
apps/console/src/components/pages/account/Security.tsx Always includes the account passkeys settings card.
apps/console/src/components/pages/account/View.tsx Removes rollout-flag filtering for account passkey navigation.
apps/console/src/components/pages/projects/$projectId/auth/Settings.tsx Always shows project passkey auth settings and setup controls.
apps/console/src/components/pages/projects/$projectId/auth/View.tsx Always renders the passkey policies view when selected.
apps/console/src/components/pages/projects/$projectId/auth/policies/Layout.tsx Always includes passkey policy navigation and search indexing.
apps/console/src/lib/command-center/entries/account.ts Removes the rollout-flag availability check from the account passkeys command.
apps/console/src/lib/command-center/entries/project-tabs.ts Removes the rollout-flag check from the project passkeys command.
apps/console/src/lib/command-center/types.ts Removes passkey availability from the command context contract.
apps/console/src/lib/console-profiles.ts Removes the passkey rollout flag from Console profile features.
apps/console/src/lib/i18n/dictionaries/he/account-global.ts Adds the Hebrew translation for the new passkey sign-in button.
apps/console/src/lib/i18n/dictionaries/ja/account-global.ts Adds the Japanese translation for the new passkey sign-in button.
apps/console/src/lib/passkeys.ts Adds conditional and optional WebAuthn mediation selection and removes rollout-flag helpers.
apps/console/src/lib/prefs-catalog.ts Removes the passkey rollout preference from the Console preference catalog.
apps/console/src/lib/user-prefs-keys.ts Removes passkey rollout preference parsing and its key.
apps/console/src/routes/_auth/sign-in.tsx Adds optional-mediation sign-in initiation and resumes conditional autofill after an unsuccessful prompt.
apps/console/src/routes/_public/account.security.tsx Loads account passkeys without checking the rollout flag.
apps/console/src/routes/_public/projects.$projectId.auth.policies.passkeys.tsx Removes the rollout-flag redirect from the passkey policy loader.
apps/console/src/hooks/use-passkeys-allowed.ts Deletes the hook that exposed passkeys according to the rollout flag.

Reviewed 7aec89d · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@luxor-code-review luxor-code-review Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR makes passkeys generally available in the console and adds a passkey sign-in button on the sign-in page, removing the rollout feature flag.

Key findings

  • 🟡 Optional passkey path ignores the 429 rate-limit ref — sign-in.tsx:326

@ChiragAgg5k
ChiragAgg5k merged commit 632800c into main Oct 12, 2026
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant