public IPhoneAuthCredential GetCredential(IAuth auth, string verificationId, string verificationCode) { var wrapper = (AuthWrapper)auth; var credential = PhoneAuthProvider.From((Auth)wrapper).GetCredential(verificationId, verificationCode); return(new PhoneAuthCredentialWrapper(credential)); }
public async Task <PhoneNumberVerificationResult> VerifyPhoneNumberAsync(IAuth auth, string phoneNumber, TimeSpan timeSpan) { try { var wrapper = (AuthWrapper)auth; var firebaseAuth = (Auth)wrapper; firebaseAuth.Settings.AppVerificationDisabledForTesting = false; var verificationId = await PhoneAuthProvider.From(firebaseAuth) .VerifyPhoneNumberAsync(phoneNumber, FirebaseAuth.VerifyingPhoneNumberAuthUIDelegate) .ConfigureAwait(false); return(new PhoneNumberVerificationResult(null, verificationId)); } catch (NSErrorException e) { throw ExceptionMapper.Map(e); } }