-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phone Auth - phoneAuthSnapshot with null values #464
Comments
I was previously getting that error just after switching projects, added SHA 1, rebuilt google-services.json, enabled phone auth method and upgraded to blaze plan (not sure if related).. after doing this, it worked again like it used to |
I deleted the app (not Project) and re created for android with SHA-1 but still getting the same error |
Just enabled the Spark Plan .... It's working now |
@pulkitkkr I'll add this to the upcoming new documentation site as a note that you need to be on a paid plan for phone auth to work. The brand new docs site isn't live yet, but if it helps both of you the start of the phone auth docs (still wip but stuff is there) can be accessed with this temporary URL: https://invertase-default.firebaseapp.com/docs/v3.0.*/auth/phone-auth Feedback on the new docs site also welcome. @flaviocarvalho are you still having an issue with null values? Which states specifically are causing issues for you or is it all of them? Edit: ah I see what you mean - think I have a rough idea of what this may be, will take a look. |
@Salakar paid plan isn't necessary , tried it again with another app ... Seems to work fine now ,l... But upon phone verification As @flaviocarvalho mentioned snapshot is null |
@pulkitkkr Yeah spark plan is free and gives you |
Okay I just tried with |
@pulkitkkr @flaviocarvalho What did you guys do to get around the @Salakar @chrisbianca Have you guys seen this at all? It's my last remaining headache from the upgrade to All other Firebase services are working properly, including the new |
@brianhiss You need to add your SHA-1 to the firebase console, in the android app dashboard: |
@flaviocarvalho I've had my |
@brianhiss |
Hi all, not ignoring this issue, I am looking into it, just a PITA to investigate phone auth issues as I get 24 hour blocked from firebase after too many attempts of using phone auth 🙈 , been blocked since yesterday, will get back to it once it lifts in the next couple of hours. Have a rough idea what the null value issue is. |
@pulkitkkr to go back to my previous statement, a paid plan is definitely required for phone auth: |
@Salakar In India, US and Canada it's free upto 10k SMS/month. I'm using it for free, can confirm that .....moreover I'm also facing an issue , phone auth work with release APK but not in debug mode |
@brianhiss try react-native run-android --variant=release ... In my case SMS services works in build mode but not in debug mode |
@pulkitkkr Appreciate that tip, unfortunately already tried all that before :) @flaviocarvalho Appreciate all your contributions, I had already tried all of them. Just asking the community here in case I missed any of the obvious. @Salakar Appreciate the insight and help, I know how busy you guys are on the core |
@pulkitkkr I'm not an expert in Android, nor can I even get my own implementation to work with Android (iOS is perfect), but do you have both keys in Firebase Console? You obvious have your release
Here is where I am Android illiterate, do you need to add in a For you Android guys, can you sign your |
@brianhiss I just checked my The only thing I have that is related to release/debug is:
And also a comment on top of that file:
Not sure if that helps you or not, let me know if you want me to check something else, pretty sure I got it running in debug, but don't know exactly how to check. |
@flaviocarvalho Thank you, always helpful to see more. I used the React Native Android Signing Guide to setup my I'm going to reach out to Firebase Support. My guess is my Android device is blocked, or my account is locked out for some reason. Let me know if you come across anything else, but I'll also update this thread with my findings. |
@flaviocarvalho is your issue resolved? |
@Ehesp I didn't try |
I have exactly the same problem. I can't use Has anyone succeed? |
This is still an issue with verifyPhoneNumber. using the example code is a good way to replicate it: |
Just So others would not think that it is an issue. Auto verification on android is supposed to return nulls. https://stackoverflow.com/questions/48334262/firebase-phone-authentication-sms-code-null-android |
@Ehesp , @Gongreg is right... why does Maybe I'm missing something, but seeing these lines looks obvious. That should avoid regenerating the credential later, which I think is one of the sources of these problems. BTW: I'm curious, the variable |
@aMarCruz react-native-firebase/android/src/main/java/io/invertase/firebase/auth/RNFirebaseAuth.java Line 1128 in 287ad21
|
is this issue closed ? |
So what are we supposed to do with this object: |
i am also getting this don't know how to solve it
|
Are you using the return values from the API calls, vs using the onAuthChanged listener objects like in the example on rnfirebase.io? My best advice is to use the listener like the example, it has all the things you need |
i am using onAuthChanged listener ..and on very first time i am getting OTP from firebase after then it always return |
I have the same issue with AUTO_VERIFIED, it returns {verificationId: null, code: null, error: null, state: "verified"}, and onAuthStateChanged will not be called.
|
@dochathuc |
@rajatrao777 |
@dochathuc |
@dochathuc Could you give an example? Passing null values to phoneAuthProvider.Credential gives me a null back. |
@hari-n-rangarajan
|
Issue
I was trying to setup phone auth (great work btw), and at first the only issue I was having was
onAuthStateChanged
not getting called afterfirebase.auth().signInWithCredential(credential)
. My app is setup in a way that onlyonAuthStateChanged
changes redux-store, after I restarted the app to try again,onAuthStateChanged
got triggered and I logged in normally, but then when i tried to replicate,phoneAuthSnapshot
was/is{verificationId: null, code: null, error: null, state: "verified"}
Tried deleting the user directly from firebase console, doesn't work either.
Here is my code:
Environment
The text was updated successfully, but these errors were encountered: