Skip to content

feat(console): email and password only for self-hosted console sign-in - #14434

Merged
ChiragAgg5k merged 3 commits into
mainfrom
fix/console-passkeys-cloud-only
Oct 13, 2026
Merged

ChiragAgg5k merged 3 commits into
mainfrom
fix/console-passkeys-cloud-only

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

A self-hosted Console signs in with email and password only. Passkeys on self-hosted are for the apps people build (the project passkey policy and the Passkey auth method), and Console OAuth needs Appwrite's own provider apps, so both stay Cloud-only.

Two new profile features in console-profiles.ts, both true on Cloud and false on self-hosted, follow the existing accountMfa and accountIdentities gates. Self-hosted installs set VITE_CONSOLE_PROFILE=self-hosted in docker-compose.yml, so they get both off.

accountOAuth

  • Sign-in and sign-up have no GitHub, Google, GitLab or Bitbucket buttons. SignIn already drops the OAuth row and its divider when onOAuthLogin isn't passed.

accountPasskeys

  • Sign-in: no "Sign in with a passkey" button, and the email field doesn't start a passkey autofill request (no /account/tokens/passkey calls). The button and autofill callbacks are only passed while the feature is on, so switching profiles through the debug menu drops them too.
  • Account › Security: no Passkeys card, and the route loader skips account.listPasskeys.
  • Settings search and the command center: no Passkeys entry.

Project passkeys (Auth › Policies › Passkeys, the Passkey auth method, Android signing certificates) are unchanged on both profiles. The server is unchanged; this only changes the Console UI.

Test plan

End to end with dev servers from main and this branch, against a local stack built from 2.5.x (/v1/health/version → 2.5.0), signing in as a seeded console user. A Playwright script checked each page.

Before, self-hosted After, self-hosted After, Cloud
OAuth buttons on sign-in / sign-up 4 / — 0 / 0 4 / 4
Sign-in passkey button shown hidden shown
/account/tokens/passkey requests on sign-in 2 0 1
Account › Security Passkeys card shown hidden —
Project Auth › Policies › Passkeys — shown —
Email and password fields shown shown shown

Sign-in, self-hosted, before

Self-hosted sign-in before

Sign-in, self-hosted, after

Self-hosted sign-in after

Sign-up, self-hosted, after

Self-hosted sign-up after

Sign-in, Cloud, after (unchanged)

Cloud sign-in after

Sign-up, Cloud, after (unchanged)

Cloud sign-up after

Account › Security, self-hosted, before

Self-hosted account security before

Account › Security, self-hosted, after

Self-hosted account security after

Project passkey policy, self-hosted, after (still available)

Self-hosted project passkeys after

Prettier and ESLint pass on the changed files.

Related: appwrite-labs/cloud#5805

@luxor-code-review

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

Copy link
Copy Markdown

Review complete. No blocking issues — approved ✅; 1 nitpick below.

🧹 Nitpicks (1) — 🟢 1 low
  • 🟢 Reset passkey UI state when accountPasskeys turns off (sign-in.tsx:311) — The new effect gate early-returns when features.accountPasskeys is false, but passkeySupported and passkeyAutofill set while the flag was on are never reset (apps/console/src/routes/_auth/sign-in.tsx:311-325).

This PR introduces an accountPasskeys profile feature flag and gates passkey UI around it: sign-in no longer fires conditional-mediation/autofill detection when the flag is off, the account security page conditionally renders the passkeys card, and the command-center entry is hidden accordingly.

Files Change
apps/console/src/lib/console-profiles.ts Adds the accountPasskeys default to console profiles
apps/console/src/routes/_auth/sign-in.tsx, apps/console/src/routes/_public/account.security.tsx Gates passkey support/autofill detection and loader prefetch on the flag
apps/console/src/components/pages/account/Security.tsx, apps/console/src/components/pages/account/View.tsx Conditionally renders the passkeys security card
apps/console/src/lib/command-center/entries/account.ts Hides the passkeys command-center entry when the flag is off
apps/console/src/routes/_auth/sign-in.tsx Stale passkey UI state when the flag turns off mid-session (finding-001)

Reviewed commit: 3f7c14a

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

ghost commented Oct 13, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

I found no defects in the incremental changes.

Adds profile-based gating for Console account passkeys, hiding the sign-in affordances, security card, data fetch, and settings/search entries on self-hosted while keeping project passkeys unchanged. The latest changes add an accountOAuth profile feature so self-hosted sign-in and sign-up use email and password, while Cloud retains OAuth sign-in.

Latest changes: The newest commits add the accountOAuth profile feature and gate OAuth sign-in and sign-up on the Cloud profile.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 7
File Change
apps/console/src/components/pages/account/Security.tsx Renders the Console account Passkeys card only when the profile enables account passkeys.
apps/console/src/components/pages/account/View.tsx Filters the Passkeys account settings entry when account passkeys are disabled.
apps/console/src/lib/command-center/entries/account.ts Hides the Passkeys command-center entry when account passkeys are disabled.
apps/console/src/lib/console-profiles.ts Defines account passkey and OAuth feature flags with Cloud and self-hosted defaults.
apps/console/src/routes/_auth/sign-in.tsx Gates passkey affordances and OAuth sign-in according to profile features.
apps/console/src/routes/_auth/sign-up.tsx Gates OAuth sign-up according to the account OAuth feature.
apps/console/src/routes/_public/account.security.tsx Fetches account passkeys in the route loader only when the feature is enabled.

Reviewed the commits since d871759 · 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

@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 · Looks good to merge. Summary

@ChiragAgg5k ChiragAgg5k changed the title feat(console): hide console account passkeys on self-hosted feat(console): email and password only for self-hosted console sign-in Oct 13, 2026
@ChiragAgg5k
ChiragAgg5k merged commit baf867a into main Oct 13, 2026
33 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/console-passkeys-cloud-only branch October 13, 2026 11:30
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