Flutter: Verify and log in through OTP

Parameters

Examples

Verify Signup One-Time Password (OTP)

final AuthResponse res = await supabase.auth.verifyOTP(
  type: OtpType.signup,
  token: token,
  phone: '+13334445555',
);
final Session? session = res.session;
final User? user = res.user;

Verify SMS One-Time Password (OTP)

final AuthResponse res = await supabase.auth.verifyOTP(
  type: OtpType.sms,
  token: '111111',
  phone: '+13334445555',
);
final Session? session = res.session;
final User? user = res.user;