mfa.noPromptOnMfaRequired
field to true in the Privy provider.Promise
that will resolve to void
if the code was successfully sent, or will reject with an error
if there was an error sending the code (e.g. invalid phone number).Next, prompt the user to enter the 6-digit code that was sent to their phone number, and use the method to complete enrollment of that phone number. As a parameter to , you must pass a JSON object with both the original that the user enrolled, and the they received at that number.See an end-to-end example of enrolling users in MFA with SMS
Promise
for an and that the user will need in order to complete enrollment.See an end-to-end example of enrolling users in MFA with TOTP
Promise
that will resolve to void
indicating success.submitEnrollmentWithPasskey
method with a list of the user’s passkey account credentialIds
. You can find this list by querying the user
’s linkedAccounts
array for all accounts of type: 'passkey'
:See an end-to-end example of enrolling users in MFA with passkeys
'sms'
, 'totp'
, or 'passkey'
) as a parameter.Promise
that resolves if the challenge was successfully created, and rejects with an error if there was an issue.'sms'
, the user will receive an SMS with their MFA code at the phone number they originally enrolled.'totp'
, the user will receive the MFA code within their authenticator app.'passkey'
, init
will return an object with options to pass to the native passkey system'sms'
or 'totp'
) and the MFA code that the user entered.See a recommended abstraction for guiding users to complete MFA
MFAModal
component that allows the user to (1) select their desired method of their enrolled MFA methods, (2) request an MFA code, and (3) submit the MFA code to Privy for verification. A sample implementation is below:'sms'
and/or 'totp'
and/or 'passkey'
).Boolean
indicating if the error meets a certain condition: