validateVerificationCode method
Verifies the phone code with the provided smsCode and verificationId.
Implementation
Future<Map<String, dynamic>?> validateVerificationCode({
required String provider,
required String method,
required String smsCode,
required String verificationId,
}) async {
try {
if (provider == 'firebase') {
if (method != 'phone') {
throw ArgumentError('Unsupported method: $method');
}
return await _validateFirebaseVerificationCode(
smsCode: smsCode,
verificationId: verificationId,
);
} else {
throw ArgumentError('Unsupported provider: $provider');
}
} catch (e) {
rethrow;
}
}