f-miyu / Plugin.FirebaseAuth

MIT License
61 stars 26 forks source link

VerifyPhoneNumberAsync #2

Closed pogrebnoydv closed 4 years ago

pogrebnoydv commented 5 years ago

why verificationResult.Credential always return NULL and always send SMS.

        var verificationResult = await CrossFirebaseAuth.Current.PhoneAuthProvider.VerifyPhoneNumberAsync(CrossFirebaseAuth.Current.Instance, "+75555555555");
        if (verificationResult.Credential != null)
        {
            var result = await CrossFirebaseAuth.Current.Instance.SignInWithCredentialAsync(verificationResult.Credential);
            await DisplayAlert(result.User.PhoneNumber, result.User.Uid, "OK");
        }
        else
        {
            var credential = CrossFirebaseAuth.Current.PhoneAuthProvider.GetCredential(CrossFirebaseAuth.Current.Instance, verificationResult.VerificationId, "123456");
            var result = await CrossFirebaseAuth.Current.Instance.SignInWithCredentialAsync(credential);
            await DisplayAlert(result.User.PhoneNumber, result.User.Uid, "OK");
        }
QuangKhanDo commented 4 years ago

Hi, im just wanna ask did you resolve this problem yet ? How did you sign up Phone Number for user, im copy your code and didn't get any SMS.