I am working on an app that uses firebase phone authentication (authUI) to sign in users. I have integrated firebase successfully in multiple apps before without any error. For this app I get the error on. This is very annoying since the app does not produce the same error on debug. I noticed the error when I uploaded the apk to playstore and my users started complaining. I have double checked everything. I even used the firebase plugin to import firebase to the project. Everything on google-services.json is okay even SHA1 matches. Anybody experienced the same and maybe anyone who know how to solve it?? Frustrating
You need to add Release Keystore SHA1 to your Firebase project just as you did add Debug SHA1
You can obtain the key
keytool -list -v -keystore [release_key_path_here]
Copy the certificate fingerprint SHA1
Follow detail steps here
Related
Tried all available solutions on the internet but still getting same error, also cross Checked SHA1 key. Used both methods Firebase and Google Developer console but all in vain.
I have face this issue,
For me I am using react-native-google-signin with firebase.
My problem was SHA certificate fingerprints on firebase console is different with my project keystore.
U can check it by run this command to make sure your SHA on firebase and keystore is same.
keytool -list -v -keystore ~/.android/debug.keystore
This is often caused by no/invalid App Signature. You most likely use bare workflow, since you're getting this error, because expo does this for you when you build the app. To achieve the same in bare workflow
Drop your android folder in Android Studio
In Upper toolbar click Build >> Generate Signed APK
Choose APK from given options.
Type in your KeyStore informations.
After building an app, you must be able to use google sign in.
I've built the App on android studio. When I connect my phone to my PC and build it directly through Android Studio it works. I get the phone verification code and am able to sign in. But when I generate a signed APK to distribute it to others, it always says "Verification Failed" and doesn't let me sign in.
I'm pretty sure there's no problem with the code, because it works perfectly when I build it through Android Studio directly onto my phone.
What Ive Tried:-
I followed the steps in this link and changed the SHA-1 code in my firebase console to the one provided in my Google Console, it still says verification failed.
I also tried to keep only one SHA-1 key in my firebase console which is the one i found in my android project, updated the google-services.json file and tried generating a signed APK, its still says verification failed.
Generate a new SHA1 fingerprint from the console in Android Studio using
keytool -list -v -keystore <absolute path of Keys generated during signed APK generation> -alias <app alias name>
Paste the generated fingerprint in the firebase console and delete the older one.
Hope this works!
The exception message shows
com.google.firebase.auth.FirebaseAuthException: This app is not authorized to use Firebase Authentication. Please verify that the correct package name and SHA-1 are configured in the Firebase Console. [App validation failed]Failed
Firstly There is no problem with the package name.
I have provided two SHA-1 keys one for debugging and another for release.
In the debug version app is getting OTP but for the release, the problem is occurring.
I generated SHA-1 for release using keytool -list -v -keystore "key store path" -alias "key alias" this.
Cant figure out the problem.
UPDATE
I used two flavours in my app
productFlavors {
lite {
}
pro {
}
}
When I removed these flavours the OTP is working fine
Well, the issue has been resolved.
The problem was occurring because of SHA-1 as I mentioned in the question. I was generating SHA-1 from my computer and (the process was perfectly fine) and uploading that on Firebase Console. After uploading the app to play store because of Play Store App Signing the SHA-1 fingerprint was getting changed.
I had to take the SHA-1 from play console
I have attached firebase on my existing android project and ran it. Here is the scenario:
If the app ran from android studio via developer mode, it(Firebase sign in via phone number) runs smoothly and I manage to log in.
However, whenever I build signed debug apk, Firebase does not allow to sign in. It gives the following message:
This app is not authorized to use Firebase authentication. Please
verify the correct package name and SHA-1 are configured in the
firebase console (App Validation Failed).
I have SHA-1 and SHA-256 key installed on Firebase console generated from my windows machine.
I would have normally provided the code however, I am guessing there is nothing wrong with the code. It works fine with the debug process. I have changed to the up-to-date google-services file from console.
Any help would be highly appreciated. Thanks in advance.
Here is my error:
When debugging, I used the normal debug key from .android/debug.keystore and this key is stored in the Firebase SHA1 field.So it worked perfectly. While trying to create a signed version, I generated a separate keystore file and created signed apk using that. Now, since the SHA1 key varied from the debug, the app was not recognized on the firebase console.
I changed the signed key to debug key. I did not want to go through a lot of changes.
If you are using another key to sign your production apk, you can obtain SHA-1 fingerprint like this:
keytool -exportcert -list -v \
-alias <your-key-name> -keystore <path-to-production-keystore>
Then you will obtain something like this:
Certificate fingerprint: SHA1: DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09
After that just copy SHA1 fingerprint and paste in your firebase's project adding new digital print in following menu:
Project Overview => Pulse in the cog (settings) => Project Configuration => scroll to bottom => add digital fingerprint.
I'm programming an android app an added Google Play Services for Google Sign-In support. Therefore I generated and downloaded my configuration file from Google's developer console. I integrated the file into the app folder and everything works fine while sign in with google in my app so far.
Now I wanted to share my Project with another colaborator, but when she pulled the code from GitHub, she cannot sign in successfully. When she tries to sign-in the GoogleSignInResult-object has the following status: Status{statusCode=DEVELOPER_ERROR, resolution=null}. As I looked up in the internet it is probably an issue with the configuration file and the correspondig SHA1-key, but I didn't find a solution.
Does anybody know how to solve thies issue?
DEVELOPER_ERROR
The developer has configured something incorrectly with their
application. This is a hard error, since retrying will not fix this.
Maybe the issue is Google Play services was unable to find a matching client from the console based on the SHA1 and package name.
You can follow this guidelines on how to troubleshoot the problem about SHA1.
The certificate with which you are signing your game should match the certificate fingerprint associated to your client ID. To verify this, first check your certificate's SHA1 fingerprint:
Find your certificate file and obtain its SHA1 fingerprint. To obtain the SHA1 fingerprint, run this command:
keytool -exportcert -alias your-key-name -keystore /path/to/your/keystore/file -list -v
Take note of the sequence of hexadecimal digits labeled SHA1: in the output. That is your certificate's fingerprint.
Note: If you are using a debug certificate, replace your-key-name with
androiddebugkey in the command above. If using a release certificate,
use the name you chose for your key when creating the certificate.
For more information and the next step, just check the link in the guidelines above.
Also check this SO question, it might help you also to solve your problem.