Search code examples
cordovaauthenticationionic2google-plus-signin

google auth works in production apk but not works after launching the app on play store in ionic 2


1.The application was build in Ionic 2 2. For implementing the google auth Cordova-plugin-google plus is used 3. The app works fine before launching on play store.


Solution

  • You need to change your SHA1 key.

    How to Get Android Release Keystore SHA1 Fingerprint

    1. Open terminal.
    2. Change the directory to the JDK bin directory,

      cd C:\Program Files\Java\jdk{Version}\bin

    3. Next you have to run the keytool.exe. Use the following line to get the SHA1 fingerprint.

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

    4. Enter the password, you will get the SHA1 and MD5 fingerprint.

    Change SHA1

    1. Go to https://console.developers.google.com/

    2. Choose your project -> Credentials -> OAuth 2.0 client IDs

    3. Click on android client id

    4. Replace SHA1 here and save it

    I hope it works for you.