google SignIn in android getting Invalid SHA-1 certificate fingerprint error

Viewed 1577

I want to integrate google SignIn to my android app. I have followed all the steps as per the documents. i have created a cerificate finger print through cmd using the following command.

keytool -list -keystore C:\Users\ufxyhy\.android\debug.keystore

I have entered the password when it prompted and then I got a key showing as SHA-256, and it shows as invalid fingerprint when creating OAuth client ID.

The result I am getting in cmd is follows

Keystore type: JKS

Keystore provider: SUN

Your keystore contains 1 entry

androiddebugkey, 18-May-2018, PrivateKeyEntry, Certificate fingerprint (SHA-256):

00:00:****************:00:00:00:00:00

It shows as SHA-256, How can I create correct SHA-1 finger print for debug?

2 Answers

you can get SHA1 with follow command

keytool -list -v -keystore {keystore_name} -alias {alias_name}

eg:

keytool -list -v -keystore C:\Users\me\Desktop\release.jks -alias sample

you can also get it in android studio directly as in image enter image description here

You need to provide default keystore password and key password which you have not provided run below code and check.

keytool -list -keystore C:\Users\ufxyhy\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
Related