Create a challenge
Prepares a challenge used to verify that a user has access to a MFA factor.
- An enrolled factor is required before creating a challenge.
- To verify a challenge, see
mfa.verify()
.
Parameters
- paramsREQUIREDMFAChallengeParamsfactorIdREQUIREDstring
ID of the factor to be challenged. Returned in enroll().
const { data, error } = await supabase.auth.mfa.challenge({
factorId: '34e770dd-9ff9-416c-87fa-43b31d7ef225'
})