mirror of
https://github.com/discourse/discourse.git
synced 2025-02-09 04:44:59 +00:00
This allows users to see their passkeys recommended by the browser as they type their username. There's a small refactor here, to make sure the same action is used by both the conditional UI and the passkey login button. The webauthn API only supports one auth attempt at a time, so in this PR we need to add a service singleton to manage the navigator.credentials.get promise so that it can be cancelled and reused as the user picks the conditional UI (i.e. the username login input) or the dedicated passkey login button.