public void StartVerification(string phoneNumber) { authType = AuthType.Phone; var options = new PhoneAuthOptions .Builder(FirebaseAuth.Instance) .SetPhoneNumber(phoneNumber) .SetTimeout(Long.ValueOf(60), TimeUnit.Seconds) .SetCallbacks(phoneCallback) .SetActivity(Xamarin.Essentials.Platform.CurrentActivity) .Build(); PhoneAuthProvider.VerifyPhoneNumber(options); SetVerificationStatus(VerificationStatus.Initialized); }
public void ResendVerificationCode(string phoneNumber) { authType = AuthType.Phone; var options = new PhoneAuthOptions .Builder(FirebaseAuth.Instance) .SetPhoneNumber(phoneNumber) .SetTimeout(Long.ValueOf(60), TimeUnit.Seconds) .SetCallbacks(phoneCallback) .SetActivity(Xamarin.Essentials.Platform.CurrentActivity); if (ResendToken != null) { options.SetForceResendingToken(ResendToken); } PhoneAuthProvider.VerifyPhoneNumber(options.Build()); SetVerificationStatus(VerificationStatus.Initialized); }