registerTotpMfaDevice
will return a URI and a secret key for the TOTP device.
You can use the URI to display a QR code to the user, so they can scan it with their authenticator app to get a TOTP code.
Unlike passkeys, registering a TOTP device will not automatically authenticate it, so you need to call authenticateTotpMfaDevice
after registering
a TOTP device for the user to complete an MFA challenge.
authenticatePasskeyMFA
will verify the TOTP code and complete the MFA challenge.
The authentication will be successful if the user enters a valid TOTP code for the registered TOTP device.
deleteMfaDevice
will delete a TOTP device associated with the authenticated user.
To delete a TOTP device, you first need to get the user to perfome an authentication challenge with that TOTP device, and then use the deleteMfaDevice
function with that MFA token.
getMfaDevices
will return all registered TOTP devices for the authenticated user.
Currently, only one TOTP device is supported per user.