I\'m trying to make react native with firebase phone auth through react-native-firebase docs and I get this error
Error: This app is not authorized to us
If you use Android Studio you can connect Firebase to your account and set the dependencies automatically
Tools -> Firebase -> Authentication -> Link:"Email and password authentication" -> Step 1 and 2 (And follow the link in Step 2)
I know that sometimes is a little bit annoying go to step by step again, but normally is the better way to find the error.
Don't know exactly the IDE that you are using, so I make this with android Studio, but you can copy to yours. Or import the Android project to do this in Android Studio
First go to your firebase console and check your package name
Now in Android Studio check if your package is really the same, inside AndroidManifest.xml
If is not the same, you should change in firebase, even launch a new project
Next step SHA-1
You can use exactly this code (don't need to change) keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
In Android Studio open the Terminal (View > Tool Windows > Terminal) and Copy/Paste
Copy the SHA-1 (suggest to save in some place)
Go to Firebase console settings (click on the gear)
Check the SHA-1
download the google-services.json
again.
Put in the app folder (Delete the previous one) You can see this in android studio using the "project" view
And what work for this question (copy from the question owner in a answer above)
You need to generate SHA1 from android studio when you run the project!
For Android studio 2.2 - result will be available under Run console but use highlighted toggle button.
If everything is correct
Certainly, that is because of the way you test.
You have to run the app on a real device then try again.
I found a solution you need to generate SHA1 from android studio when you run the project!
For Android studio 2.2 - result will be available under Run console but use highlighted toggle button.