-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
signoutpromise broken (iOS) #16
Comments
I've experienced this too. My UI hangs on awating the Promise to resolve. Tapping the button again signs the user out |
same problem, thanks @YousefED for quick-fix |
@joonhocho what's your view on this? |
@YousefED If you remove async, are you saying it will raise disconnect event and thus resolved? |
@joonhocho honestly this is a while ago, I see we also made the following change to resolve this issue: YousefED@8227feb. Don't remember 100% but looks related :) |
@joonhocho the core of the issue is, is that: await signOutPromise() never resolves on iOS. the onDisconnect / onDisconnectError handlers are never called. Do you have a suggested fix? |
experiencing the same issue, signOutPromise never resolve (nor reject) |
@YousefED @jasonnathan @frozenxis @RalfNieuwenhuizen @calcal12 This issue has been fixed with new version. Just upgraded to the latest Google SignIn SDK for iOS. (npm version 1.0.16) |
FYI, |
I think signout promise never resolves, because you're listening for disconnect events.
If just doing a sign out, the user will only be signed out locally and the disconnect events never raise.
Just calling .signOut doesn't work either, as this is dispatched async on iOS, so the function returns before the user is signed out.
For my own workaround, I've removed the async dispatch in signOut https://github.com/YousefED/react-native-google-sign-in/blob/master/ios/RNGoogleSignIn/RNGoogleSignIn.swift. Not sure this is the correct solution, but seems to be working for our use case now
The text was updated successfully, but these errors were encountered: