WebauthnAuthenticationFlows
Methods
modal
▸ modal(username?
, options?
): Promise
<string
>
Invokes a WebAuthn authentication, including prompting the user to select from a list of registered credentials, and then prompting the user for biometrics. The credentials list is displayed using the native browser modal.
If username isn't provided, it will promote a modal with a list of all discoverable credentials on the device. If username is provided, this call must be invoked for a registered username. If the target username is not registered or in case of any other failure, an SdkError will be thrown.
If authentication is completed successfully, this call will return a promise that resolves to the credential result, which is an object encoded as a base64 string. This encoded result should then be passed to the backend authentication endpoint to retrieve user tokens.
Throws
Throws
Throws
Throws
Throws
AuthenticationProcessAlreadyActive
Parameters
Name | Type | Description |
---|---|---|
username? |
string |
Name of user account, as used in the WebAuthn registration. If not provided, the authentication will start without the context of a user and it will be inferred by the chosen passkey |
| options?
| WebauthnAuthenticationOptions
| WebauthnAuthenticationOptions Options for the authentication process |
Returns
Promise
<string
>
Base64-encoded object, which contains the credential result. This encoded result will be used to fetch user tokens via the backend authentication endpoint.
Properties
autofill
• autofill: AutofillHandlers
Property used to implement credential selection via autofill UI.