Python: Enroll a factor | Supabase Docs (original) (raw)
Currently,
totp
is the only supportedfactor_type
. The returnedid
should be used to create a challenge.To create a challenge, see mfa.challenge().
To verify a challenge, see mfa.verify().
To create and verify a challenge in a single step, see mfa.challenge_and_verify().
Examples
Enroll a time-based, one-time password (TOTP) factor
response = supabase.auth.mfa.enroll(
{
"factor_type": "totp",
"friendly_name": "your_friendly_name",
}
)