Google Signin Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. To generate SHA-1 key for android on Linux: | |
https://stackoverflow.com/a/34933381 | |
OR | |
For Debug mode: | |
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android | |
For Release mode: | |
keytool -list -v -keystore {keystore_name} -alias {alias_name} | |
-------------------------------------------------------------------------------------- | |
Example: | |
keytool -list -v -keystore C:\Users\MG\Desktop\test.jks -alias test | |
-------------------------------------------------------------------------------------- | |
OR | |
-------------------------------------------------------------------------------------- | |
- Copy the APK to your PC in Program Files\java\jdkX.X.X_XXX\bin folder. In general, for windows, its C:\Program Files\Java\jdk1.8.0_191\bin and for mac, its /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/bin | |
- Open CMD/Terminal in this directory and type the following | |
keytool -list -printcert -jarfile YOUR_APK_NAME.apk | |
- SHA1 value will be generated like: 79:D0:E6:80:4E:28:1E:D1:88:28:CB:D7:E6:BE:2E:0C:FB:24:98:52 | |
======================================================================================= | |
2. To resolve google signin error: “Google sign in error 12500” Or “Non-recoverable error occurred”: | |
Make sure to: | |
- add SHA1 key for release and debug on firebase console(see above point for SHA1 key generation) | |
- add Support Email on the firebase console | |
- Add Application Homepage link, Application Privacy Policy link, Application Terms of Service link on https://console.developers.google.com/apis/credentials | |
- If app is on PlayStore(live or in beta), | |
-Go to https://play.google.com/apps/publish | |
-select your app | |
-From Left menu, go to release management -> App Signing and from the “App signing certificate” section, copy the SHA-1 key and update the key on the firebase console. | |
OR | |
We can connect our app with the firebase using Android studio firebase assistant, which automatically adds our SHA1 key to the firebase: | |
https://stackoverflow.com/a/47287677 | |
https://stackoverflow.com/questions/47632035/google-sign-in-error-12500 | |
https://stackoverflow.com/a/57007750 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment