SHA-1 / SHA-256
If you want to use the firebase phone authentication or google sign-in, you need to register SHA-1 and SHA-256. I’m using Android Studio as my IDE.
- In the Project folders list on the left, open android/app/build.gradle, click on the “Open for Editing in Android Studio” on the top right corner, and once you do so, click on the Gradle tab on the right.
2. In the terminal, enter the following :
Mac: keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass androidWindows: keytool -list -v -keystore "\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
You’ll see the information you need in the terminal.
3. There are other variants of SHA-1 and SHA-256. To find that, you need to click on android/app/Tasks/android (in the Gradle window we opened).
If for some reason, you cannot see such folder, go to Preferences and in the bottom Experimental tab, uncheck “Do not build Gradle task list during Gradle sync” box.
Of the various variants that pop up, you need to use the debug variant.