I encountered this error when used
GoogleSignin.configure({
webClientId: env.GOOGLE_WEB_ID,
offlineAccess: true,
});
It works if I remove webClientId (Webclient already active in web version). But i need use serverAuthCode. How to fix it, I tried the solution at the forum but could not fix it :(
My scope in google console.

SAME HERE!!!
same here too
hi, one of the maintainers here. I'm not using this functionality and don't have time to fix this. If there's anyone using the lib who needs this, please go ahead and provide a PR for this, I'll be available for code review and help if necessary.
Thanks.
When creating a project, select an existing project at console.cloud.google.com. It works for me.

finally, I understood.
You have to go to Firebase console > authentication > google signin (make activate!) > web SDK setting.
And its "Web client SDK" would be used for GoogleSignin.configure .
Hey @goleador0322, It work. I register app into firebase and configure SHA1 and app package name. after configure it work without any issue. Thanks
sir, i did the same steps. i am getting same error. @kishanmundha , @goleador0322 sir can you help me.
componentDidMount() {
GoogleSignin.hasPlayServices({ showPlayServicesUpdateDialog: true })
.then(() => {
// play services are available. can now configure library
})
.catch(err => {
console.log('Play services error', err.code, err.message);
});
GoogleSignin.configure();
GoogleSignin.configure({
scopes: ['https://www.googleapis.com/auth/drive.readonly'], // what API you want to access on behalf of the user, default is email and profile
// // iosClientId: '<FROM DEVELOPER CONSOLE>', // only for iOS
// // webClientId: "295437555563-qh5qqili26q3hm3ggpn4d7fh887ahu30.apps.googleusercontent.com" // client ID of type WEB for your server (needed to verify user ID and offline access)
webClientId: '438492594100-eum221fmi9m45pso1qeoieo9aje02f7t.apps.googleusercontent.com' // client ID of type WEB for your server (needed to verify user ID and offline access)
// offlineAccess: true, // if you want to access Google API on behalf of the user FROM YOUR SERVER
// hostedDomain: '', // specifies a hosted domain restriction
// forceConsentPrompt: true, // [Android] if you want to show the authorization prompt at each login
// accountName: '', // [Android] specifies an account name on the device that should be used
});
}
googleSignIn = async () => {
console.log('function running');
try {
const userInfo = await GoogleSignin.signIn();
console.log(userInfo);
ToastAndroid.show('user info=' + userInfo, ToastAndroid.SHORT);
// this.setState({ userInfo });
} catch (error) {
if (error.code === statusCodes.SIGN_IN_CANCELLED) {
console.log('error 1', error);
} else if (error.code === statusCodes.IN_PROGRESS) {
// operation (f.e. sign in) is in progress already
console.log('error 2', error);
} else {
console.log('error 3', error);
ToastAndroid.show('error=' + error, ToastAndroid.SHORT);
// some other error happened
}
}
};
sir this is my code
even i had the same error it took a whole day for me to solve it. It was because of the SHA -1 certificate problem. i gave the value from different keystore in the firebase ,hence google-services.json had some wrong client id which was making the request fail so i did the following steps.
1)deleted the SHA-1 key from firebase
2) generated the key (referring to this article ->[ https://developers.google.com/android/guides/client-auth ])
3)placed the key in the fire base and generated new google -services.json file
always use :- keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
commond dont even change the path(in windows)
default password:-android
Set Support email in firebase settings
I searches and came across the following steps
https://console.developers.google.comrequest
I get developer error
Thanks all !
I solve it by doing the following steps :
if HAVING DEVELOPER_ERROR or "non recoverable sigin error" ......
any one having issues with debug mode can watch this vedio it will satisfy you it has complete google login working with react native cli (init version )
Go to https://console.developers.google.com/apis/credentials > create or use existing web OAuth 2.0 client > use client id of this web client in GoogleSignin.configure
For me, these steps fixed the problem.
Add support email in firebase your settings 👍
1) Go to Firebase
2) Go to your Project
3) Go to Project Settings
4) In public settings support email option ( Add your email there).
@uchar It worked for me. Thanks!
Setting both SHA1 & SHA256 in firebase from the given link worked well.
@uchar Not working for me
i have tried all of the cases
?????????????
What worked for me:
cd ./android && ./gradlew signingReportSHA1 of Task :app:signingReport, Variant: debugAndroidTest, Config: debugProject Settings, Android app, add the SHA1google-services.json, put it in ./android/appAuthentication, then Sign-in method, then press GoogleWeb client ID and use that for your GoogleSignin.configure({ webClientId: ... });Web client ID should be the same as listed in https://console.developers.google.com/apis/credentials?project=<your_project_id> -> Credentials -> OAuth 2 Client ID -> Web ClientWhat worked for me:
cd ./android && ./gradlew signingReport- Take the
SHA1ofTask :app:signingReport,Variant: debugAndroidTest,Config: debug- Update it the Firebase Console under
Project Settings,Android app, add theSHA1- Download the
google-services.json, put it in./android/app- Go to
Authentication, thenSign-in method, then press- Take the
Web client IDand use that for yourGoogleSignin.configure({ webClientId: ... });- This
Web client IDshould be the same as listed inhttps://console.developers.google.com/apis/credentials?project=<your_project_id>->Credentials->OAuth 2 Client ID->Web Client
This solution solved my issue. I was using a wrong sha-1 key instead. Hence I followed your instructions and used the sha-1 key under app:SigningReport instead with the variant: debugAndroidTest
For my problem, I copied the application signing sha1 hash code from Application signing key certificate part of google play console > Release Management > App Signing page. Then I pasted it to Firebase settings and this solved the problem.
At first I got the code inside 'oauth_client' but actually we should get 'client_id' in 'service' of file 'google-services'
GoogleSignin.configure({
webClientId:
'client_id of services'
});
I have tried every single solution on the internet and still getting Error: A non-recoverable sign in failure occurred
Tôi đã thử mọi giải pháp trên internet và vẫn nhận được
Error: A non-recoverable sign in failure occurred
metoo :(
When creating a project, select an existing project at console.cloud.google.com. It works for me.
@hugoh59 @dfjerry
Did you try it? It's works for me.
Most helpful comment
finally, I understood.
You have to go to Firebase console > authentication > google signin (make activate!) > web SDK setting.
And its "Web client SDK" would be used for
GoogleSignin.configure.