verify method
Future<ApplicationVerificationResult>
verify(
- FirebaseAuth auth,
- String nonce, {
- bool forceRecaptcha = false,
override
Implementation
@override
Future<ApplicationVerificationResult> verify(FirebaseAuth auth, String nonce,
{bool forceRecaptcha = false}) async {
if (!forceRecaptcha) {
var p = Platform.current;
if (p is IOsPlatform || p is MacOsPlatform) {
try {
var v = await verifyWithApns(auth);
if (v != null) return ApplicationVerificationResult.apns(v);
} catch (e, tr) {
Logger('FirebaseAuth').warning(
'Failed to verify application with APNS, will try recaptcha instead.',
e,
tr);
}
} else if (p is AndroidPlatform) {
try {
var v = await verifyWithPlayIntegrity(auth, nonce);
if (v != null) return ApplicationVerificationResult.playItegrity(v);
} catch (e, tr) {
Logger('FirebaseAuth').warning(
'Failed to verify application with Play Integrity, will try recaptcha instead.',
e,
tr);
}
}
}
var v = await verifyWithRecaptcha(auth);
return ApplicationVerificationResult.recaptcha(v);
}