I'm having a crash when the user cancel the sign in.
JSON value '{
code = "-5";
message = "Error Domain=com.google.GIDSignIn Code=-5 \"The user canceled the sign-in flow.\" UserInfo={NSLocalizedDescription=The user canceled the sign-in flow.}";
}' of type NSDictionary cannot be converted to NSString
Seem it's a error inside the iOS native, I can't handle it with a try catch.
Are you guys having the same issue?
Version 0.8.1
React native 0.38
When the button was clicked the user is redirected to the browser in ios. After clicking allow, it's redirected to google.com instead of back to the app. And when done is clicked, I got a similar error in the console.
Me too
https://github.com/devfd/react-native-google-signin/issues/152 Try with this if you have fb login as well.
@GaryLengkong @oximer @golya If you haven't tried, I created https://github.com/joonhocho/react-native-google-sign-in that uses the latest Google Sign-In SDK.
It works for me and I am using it for my project.
Hello! I find out that problem gone away if you implement GIDSignInDelegate in AppDelegate, strange but works for me.
There's an example app, copy AppDelegate.m and just use your metadata for it. Then it will no longer just redirect to google.com.
This was kind of a time sink and would be appreciated in the README as a required step! The expectation set is that you can run two commands and get going, but it is not the reality.
Does anyone have a clear path to resolution to this?
I have FB implemented and Google Sign-in works but if I cancel the sign-in on iOS app seems to crash/get stuck (I don't see any errors).
The code proposed in #152 doesn't seem to be compatible with current version (if I understand it correctly).
We updated the SDK version, please check out our example app it shows how to install and make this lib work.
Open new issue with a reproducible example if this problem still persist
Thank you.
i use this code and it work
Is there a sure fix for this issue?
I actually was able to solve this in JS. I changed:
const data = await GoogleSignin.signIn()
to:
GoogleSignin.signIn().then(data => {
// ...
const credential = firebase.auth.GoogleAuthProvider.credential(data.idToken, data.accessToken)
// ...
}).catch(error => {
console.log('GOOGLE SIGN IN ERROR=', error)
})
Most helpful comment
When the button was clicked the user is redirected to the browser in ios. After clicking allow, it's redirected to google.com instead of back to the app. And when done is clicked, I got a similar error in the console.