Skip to content

Only show sign-in options that are set up, and fix login buttons - #315

Open
kaareal wants to merge 4 commits into
masterfrom
feature/passkey-availability-check-1b7e72
Open

kaareal wants to merge 4 commits into
masterfrom
feature/passkey-availability-check-1b7e72

Conversation

@kaareal

@kaareal kaareal commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Security settings page showed passkey, Google and Apple options even when they weren't set up, and clicking the passkey button on the login page made the email and password fields go red. This PR fixes both and turns passkeys on by default.

Changes

Security settings page

  • The "Add Passkey" button only appears when passkeys are turned on and the browser supports them.
  • If passkeys are off and the user has none, the whole Passkey card is hidden. Users who already have passkeys still see them, so they can delete them.
  • Google and Apple only appear when they're set up for the app, or when the user has already connected them (so they can disconnect).
  • If neither Google nor Apple applies, the "Sign-in with" card is hidden.
  • Error messages now show at the top of the page instead of inside the "Sign-in with" card, so they're still visible when that card is hidden.

Login page

  • Clicking the passkey, Google or Apple button no longer submits the login form, so the email and password fields no longer turn red with "required".
  • The passkey button is also hidden in browsers that don't support passkeys.

Config

  • Passkeys are on by default (AUTH_PASSKEY=true in services/web/.env).

Notes for reviewers

  • To turn passkeys off, leave AUTH_PASSKEY empty. Setting it to false won't work because any value counts as on.
  • This only changes the web app. The API still accepts passkey requests even when AUTH_PASSKEY is off.
  • Tested in the browser: the passkey button shows on the login page, and clicking it no longer turns the fields red. Linting hasn't been run.

canShowPasskey now also requires browser WebAuthn support. The Security
settings screen hides the Add Passkey button when passkeys are unavailable,
and hides the Passkey card entirely unless the user has existing passkeys
to remove.
Google and Apple rows show only when the provider is configured (same check
as the login screen) or already connected, so a connected provider can still
be disabled. The card hides when neither shows. The page error message moves
out of the card so passkey errors stay visible.
@kaareal kaareal changed the title Hide Add Passkey when passkeys are not offered Hide unavailable passkey and sign-in providers in Security settings Sep 24, 2026
Passkey, Google and Apple buttons render inside the login form and defaulted
to type=submit, so clicking them triggered form validation.
@kaareal kaareal changed the title Hide unavailable passkey and sign-in providers in Security settings Show auth options only when available; fix sign-in buttons submitting login Sep 24, 2026
@kaareal kaareal changed the title Show auth options only when available; fix sign-in buttons submitting login Only show sign-in options that are set up, and fix login buttons Sep 24, 2026
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