Verify a challenge
Verifies a code against a challenge. The verification code is provided by the user by entering a code seen in their authenticator app.
- To verify a challenge, please create a challenge first.
Parameters
- paramsREQUIREDMFAVerifyParamsfactorIdREQUIREDstring
ID of the factor being verified. Returned in enroll().
codeREQUIREDstringVerification code provided by the user.
challengeIdREQUIREDstringID of the challenge being verified. Returned in challenge().
const { data, error } = await supabase.auth.mfa.verify({
factorId: '34e770dd-9ff9-416c-87fa-43b31d7ef225',
challengeId: '4034ae6f-a8ce-4fb5-8ee5-69a5863a7c15',
code: '123456'
})