Documentation Index
Fetch the complete documentation index at: https://docs-staging.auth0-mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
registerPasskeyAutofill(Initializes a passive WebAuthn credential request usinginputId?:string):Promise<void>
navigator.credentials.get() with mediation: "conditional". When supported, this allows the browser to display stored passkeys directly within the username field’s autocomplete dropdown. Selecting a passkey completes authentication without requiring additional user interaction.
Call this once when the login screen is initialized (for example, on page load). If Conditional Mediation is not supported by the browser, the method safely no-ops.
Parameters
The ID of the username
<input> element (without #). Example: "username". When provided, the SDK validates the element exists, confirms it is an <input>, and overwrites its autocomplete attribute to "username webauthn".If omitted, you must configure the input element manually:Returns
Promise<void>
Resolves when the Conditional UI registration completes.
Example
Gotchas
- The
autocompleteattribute must exactly contain"username webauthn". Including unrelated tokens such as"email"or"text"will prevent browsers from showing the passkey dropdown. - Overwriting the attribute is intentional and required for consistent behavior across browsers. Do not rely on merging or extending existing autocomplete values.
- If Conditional Mediation is not supported by the browser, the SDK will safely no-op.
Remarks
This method delegates to the internalregisterPasskeyAutofill() utility, returning a background AbortController to manage request lifetime. It should only be invoked once per page lifecycle.