verifyOtp
method takes in different verification types. If a phone number is used, the type can either be sms
or phone_change
. If an email address is used, the type can be one of the following: signup
, magiclink
, recovery
, invite
or email_change
.verifyOtp
to sign up or sign in a user.The token that user was sent to their email or mobile phone
Type of the OTP to verify
Email address that the OTP was sent to
Phone number that the OTP was sent to
URI to redirect the user to after the OTP is verified
The captcha token to be used for captcha verification
Token used in an email link
final AuthResponse res = await supabase.auth.verifyOTP(
type: OtpType.signup,
token: token,
phone: '+13334445555',
);
final Session? session = res.session;
final User? user = res.user;
final AuthResponse res = await supabase.auth.verifyOTP(
type: OtpType.sms,
token: '111111',
phone: '+13334445555',
);
final Session? session = res.session;
final User? user = res.user;