verifySmsOtp method

Future<Map<String, dynamic>> verifySmsOtp({
  1. required String phone,
  2. required String code,
})

Verify a phone OTP and sign in (creates the user on first sign-in). Returns {user, session} and updates auth state like a password sign-in. Too many attempts → AuthException with code OTP_RATE_LIMITED (429).

Implementation

Future<Map<String, dynamic>> verifySmsOtp({
  required String phone,
  required String code,
}) async {
  return await _executeWithCompleter<Map<String, dynamic>>(
    'auth_success',
    AuthVerifySmsOtpEvent(phone: phone, code: code),
  );
}