React-native google signin gives Developer Error

Walkthrough for different modes:

Development Firebase

  1. run cd android && ./gradlew signingReport.
  2. Copy the SHA-1 hash and paste it into the firebase console under Android in Project Settings.
  3. Download the google-services.json file from the Firebase settings and paste the file into android/app
  4. Use the client client_type: 3 clientId inside the config.

Development non-Firebase

  1. run cd android && ./gradlew signingReport.
  2. Copy the SHA-1 hash
  3. Go to Google Cloud Platform Console and click Create Credentials -> OAuthClientID. Choose type Android and paste the hash and fill in the form
  4. Create another Client by clicking Create Credentials, but choose type Web application this time.
  5. Use the webclient in your code

Production/Release version

  1. Go to the Google Play console and copy SHA-1 key from Release -> Setup -> App Integrity
  2. Go to Google Cloud Platform Console and click Create Credentials -> OAuthClientID. Choose type Android and paste the hash and fill in the form
  3. Create another Client by clicking Create Credentials, but choose type Web application this time.
  4. Use the webclient in your code

Leave a Comment