WebAuthn

Web Authentication API (Password-less/Passkey)

How to use the WebAuthn class of the bit Butil?

Usage
To use the WebAuthn api of Butil you need to inject the Bit.Butil.WebAuthn class and use it like this:
@inject Bit.Butil.WebAuthn webAuthn

@code {
    var result = await webAuthn.CreateCredential(new { ... });
}
            
Note: For optimal security, it is advisable to implement Web Authentication alongside a server-side counterpart that securely stores essential data for future verification. This approach, similar to our existing integration with the FIDO2 infrastructure, ensures robust authentication and safeguards against potential threats.
You can check it out in action in the Passwordless tab on the settings page of bit Boilerplate project template
Methods

CreateCredential:
Creates a new credential using the provided options. (MDN).



GetCredential:
Gets a credential using the provided options. (MDN).



Verify:
Verifies a user using the credential api of the browser.