Disable Add passkey button if password authentication disabled

What does this MR do and why?

In the two-factor authentication page, disable the button Add passkey and shows a warning if the password authentication is disabled for the GitLab instance. For such instance, we don't allow passkey sign-in, so it makes sense to disable the Add passkey button.

References

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Enable this feature flag: https://gdk.test:3443/rails/features/passkeys
  2. Disable password authentication for the web: https://gdk.test:3443/admin/application_settings/general#js-signin-settings
  3. Go to the two-factor authentication page: https://gdk.test:3443/-/profile/two_factor_auth

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eduardo Sanz García

Merge request reports

Loading