-3

I will signin with google it's working but whenever I'll create release build it not working

GoogleErrorcode : DEVELOPERERROR
Akshay I
  • 3,675
  • 1
  • 34
  • 57
  • if you want to google signin without firebase then read this [enter link description here](https://stackoverflow.com/questions/63846746/how-to-setup-google-sign-in-for-react-native-app-without-firebase/72041076#72041076) – Deepak Singh Apr 28 '22 at 09:29

7 Answers7

6

Please check if Google Play App Signing is enabled from the Google Play Console -> Release Management -> App Signing.
Please try below steps:

1] You have to copy the SHA1 from the 'App signing certificate' section and need to add it to the Firebase projects general settings section.
2] Afterward need to regenerate the json file and add it to the project.
3] Re-generate the apk and the error will get resolved.
Sandy.....
  • 2,833
  • 2
  • 15
  • 26
  • If you are passing webClientId in configuration object to GoogleSignin.configure() make sure it's correct. You can get your webClientId from https://console.developers.google.com/apis/credentials. They're listed under "OAuth 2.0 client IDs". – Sandy..... Aug 01 '18 at 05:07
  • I could not find Release Management -> App Signing on my google developer console – salvi shahzad Sep 25 '20 at 13:19
  • 1
    This is a great detail that is not explained in any documentation. – J.C. Gras Apr 24 '21 at 15:48
  • The app signing key is in setup > App Integrity > App signing – olawalejuwonm Nov 18 '22 at 09:11
3

If folks are still having this issue and have stumbled across this as i did. Here's what i figured out for my react native android firebase project

THERE ARE MULTIPLE SHA-1's TO ADD IN FIREBASE

1. SHA-1 For Release Variant

This is found in the Keystore file. You would have to add it to your Firebase Console Project Settings

a. Get release variant SHA-1 by running command below from you RN project root

$ cd android && ./gradlew signingReport

b. Add the release SHA-1 from here to your Firebase Console Project Settings


2.SHA-1 After you upload to google play store for testing / prod rollout

a .SHA-1 is found in the left nav of your google playstore console. Setup -> App signing -> App signing key certificate

b. Add this to your Firebase Console Project Settings for google sign in to work in testing / prod

r2Dragon
  • 83
  • 7
1

Solved by adding release keystore SHA-1 to firebase console.

Use below command to create release SHA-1 and Add it to firebase console:

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

Note : Apk not need to create again.

Bhagwat K
  • 2,982
  • 2
  • 23
  • 33
1

Yesterday same problem occurred to me.

Google has released a new signing service in playstore publish console in which google will signin your app with his keystore. After signing , it will give you a new SHA which you have to add in your firebase account.

see the image for the better understanding

enter image description here

1

I have got a solution to this problem. You have to put both SHA key i.e. SHA for debug Keystore file and SHA for release jks file, into the firebase project setting.

  • Go to: https://console.firebase.google.com/
  • Now choose your project
  • Click the setting button near Project Overview
  • Choose Project Setting
  • Enter both SHA1 (debug SHA1 and release SHA1) in SHA certificate fingerprint
  • Save it
  • Download the google-services.json file
  • Run npx react-native run-android --variant=release in terminal

It worked for me very well.

1

There is a new signing service from Google in the Playstore publish console, in which Google will sign your app with his keystore. After signing, it will give you a new SHA, which you need to connect to your Firebase account.

Go to Google play store -> Release -> Setup -> App Integrity

Copy: SHA-1 certificate fingerprint from "App signing key certificate"

Add this into Firebase Project Project Setting -> Select your app -> Add Fingerprints and Paste it here

farhan meo
  • 37
  • 1
  • 1
  • 5
0

After than many time trying i got the solution.

In GoogleSignin.configure i was place android client it, that why i getting the error

Finally i will place the web client id(Here)

GoogleSignin.configure({
  iosClientId: 'client ID',
  webClientId: 'My Web client ID'
})
Akshay I
  • 3,675
  • 1
  • 34
  • 57