Skip to content

feat(console): turn passkeys on with a domain picker instead of a disabled toggle - #14313

Merged
ChiragAgg5k merged 4 commits into
mainfrom
feat/console-passkey-onboarding
Oct 11, 2026
Merged

ChiragAgg5k merged 4 commits into
mainfrom
feat/console-passkey-onboarding

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Passkey was the only auth method that started disabled, with "Set a relying party ID and origins in passkey policies to enable" under its toggle. This PR keeps the one decision that's genuinely the developer's (which domain passkeys are bound to) and makes it part of turning the method on.

Depends on #14310. The server now takes passkey origins only from the project's platforms and returns them read-only on the policy; the dialog saves only the domain. Merge and deploy #14310 (and ship it to Cloud) before tagging a Console release with this.

  • The Passkey toggle is no longer disabled. When passkeys can't work yet, turning it on opens a dialog that suggests the domain from the project's web platforms (parent domain first, since it also covers subdomains), shows exactly where passkeys will work, and saves the domain and enables the method in one step. Hostnames under the Sites and Functions domains only suggest themselves, never the shared parent.
  • With a localhost web platform, the toggle turns on straight away. Whether passkeys are ready comes from the server's origins, not a client-side copy of the rules.
  • The policy card takes only the relying party ID and shows "Where passkeys work" from the server's origins (localhost once, for any port). An unsaved domain is previewed from the platforms. The origins editor is gone.

Before

Before: toggle disabled behind a hint

After

Auth methods: the toggle is enabled, with no setup hint.

Auth methods

Turning Passkey on asks for the domain, suggested from the app.example.com web platform, and shows where passkeys will work.

Enable passkeys dialog

One click later the method is on.

Enabled

The policy card shows where passkeys work, as computed by the server.

Passkey policy

Adding a localhost web platform covers local development on any port.

Policy with localhost

Without a web platform on the chosen domain, the dialog says what is missing and Enable stays disabled.

No platform

Test Plan

  • e2e/console.mocked.passkeys.spec.ts: 12 tests covering the dialog, suggestions, the request payloads (rpId only), localhost, the missing-platform state, and the card reading origins back.
  • The screenshots above come from this Console running against feat(passkeys): take passkey origins from web platforms #14310's server (live API, not mocked).
  • ESLint and tsc are clean on the changed files.

Related PRs and Issues

Server side: #14310.

Related: appwrite-labs/cloud#5805

@luxor-code-review

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

Copy link
Copy Markdown

Review complete. 🟠 1 high

💬 Inline comments (1)


This PR introduces a dedicated Enable Passkeys dialog, reworks the Passkey relying-party policy card (suggested rpIds, custom origins rows), centralizes origin/rpId derivation in passkey-policy.ts, and updates the mocked passkeys e2e spec to cover the new flows.

Files Change
apps/console/src/lib/passkey-policy.ts Adds platform/rpId/origin derivation helpers and passkey-readiness logic mirroring server rules
apps/console/src/components/pages/projects/$projectId/auth/EnablePasskeys.tsx New enable dialog with rpId choice, custom origins, and policy PATCH
apps/console/src/components/pages/projects/$projectId/auth/policies/PasskeyRelyingPartyCard.tsx Reworks the RP policy card with suggestions and editable custom-origin rows
apps/console/src/components/pages/projects/$projectId/auth/Settings.tsx Wires the toggle to the new dialog and readiness state
apps/console/e2e/console.mocked.passkeys.spec.ts Updates mocked e2e coverage for the new enable flow and PATCH payloads

Reviewed commit: d91399f

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

ghost commented Oct 9, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

This change replaces the disabled Passkey toggle setup hint with a domain-selection dialog that saves the relying party ID before enabling the auth method. The policy card now displays server-reported origins, with platform-based previews and suggestions for unsaved domains.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 6
File Change
apps/console/e2e/console.mocked.passkeys.spec.ts Updates mocked API coverage for platform-derived origins, domain selection, and enabling passkeys.
apps/console/src/components/pages/projects/$projectId/auth/EnablePasskeys.tsx Adds the dialog for choosing and saving a relying party domain before enabling passkeys.
apps/console/src/components/pages/projects/$projectId/auth/PasskeyOrigins.tsx Adds a shared display for supported origins, including localhost.
apps/console/src/components/pages/projects/$projectId/auth/Settings.tsx Connects the Passkey toggle to the setup dialog when the server reports no usable origins.
apps/console/src/components/pages/projects/$projectId/auth/policies/PasskeyRelyingPartyCard.tsx Replaces origin editing with server-reported origins and platform-derived previews and suggestions.
apps/console/src/lib/passkey-policy.ts Adds platform-origin previewing and relying-party suggestions based on public suffixes.

Reviewed bf7caa2 · 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 A · See the inline comments. 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.

The PR reworks the passkeys enable flow in the Console (policy card, enable dialog, shared passkey-policy helpers, and mocked e2e coverage), with one high-severity fail-closed issue around empty stored origins.

Key findings

Comment thread apps/console/src/lib/passkey-policy.ts Resolved

@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 A · See the inline comments. Summary

Comment thread apps/console/src/lib/passkey-policy.ts Resolved
…abled toggle

The Passkey toggle was the only auth method that started disabled behind a policy hint. Turning it on now asks for the domain in place, suggested from the project's web platforms, and shows where passkeys will work; projects with a localhost platform turn on straight away. The policy card shows the origins that come from web platforms and keeps the explicit list as an optional override.
…om origins

The server now computes passkey origins from the project's platforms and no longer accepts a list, so the policy card reads them back instead of mirroring the rules, and the origins editor is gone. An unsaved domain is still previewed from the platforms.
…region

Region-specific console variables can name different shared domains, and the domain picker must never offer a shared parent.
@ChiragAgg5k
ChiragAgg5k force-pushed the feat/console-passkey-onboarding branch from 53ad8ad to 5b018b7 Compare October 9, 2026 14:55
@ChiragAgg5k

Copy link
Copy Markdown
Member Author

@hansi-codes review

@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 A · See the inline comments. Summary

Comment thread apps/console/src/lib/passkey-policy.ts Resolved

@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 A · See the inline comments. Summary

A hand-written suffix list offered ne.jp for app.example.ne.jp, which the server rejects. tldts follows the same public suffix list as the server, private suffixes such as github.io included.
@ChiragAgg5k

Copy link
Copy Markdown
Member Author

@hansi-codes review

@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

@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

@ChiragAgg5k
ChiragAgg5k merged commit 66f4926 into main Oct 11, 2026
41 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the feat/console-passkey-onboarding branch October 12, 2026 09:05
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