-
Notifications
You must be signed in to change notification settings - Fork 183
ios return user when restorePreviousSignIn() #194
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
Conversation
|
Welcome to os, Congratulations on the first contributing 🎉 |
|
Thanks very much @webdog-rich. Unfortunately, I'm still having the same issue on iOS. Perhaps there is something else I'm doing wrong, but I still can't find it. For now, I've just had to avoid it using in iOS (but I'm still using 3.0.2 successfully in android and web with no issues). |
|
Have you definitely upgraded to the latest commit? Can you check if you have any differences to this file in the plugin directory? https://github.com/CodetrixStudio/CapacitorGoogleAuth/blob/master/ios/Plugin/Plugin.swift Also, make sure to build the project for ios again - "ionic capacitor build ios" (or similar if you are not using ionic). I also added error logging for restorePreviousSignIn(), so maybe an error is now logged in the console which will tell us what the issue is? |
|
@webdog-rich @reslear should Occasionally, when calling Thanks for all the great work on this project :) |
|
@collindutter thx, and what do you suggest? |
|
Replace: with some variation of: Edit: I suppose with this latest PR, I should be able to refresh my token just by calling |
|
@collindutter PR welcome :) |
|
@reslear Sure thing, I'm happy to start on this! Though do you think having a |
|
@collindutter i'm not iOS developer 😀 maybe @joeflateau will help reply? |
Hi @webdog-rich, I've done all of those steps. When I try to debug the swift code in XCode when running on my iphone 13 pro (https://github.com/CodetrixStudio/CapacitorGoogleAuth/blob/master/ios/Plugin/Plugin.swift), it seems to give me a chance to choose "continue" in the attached picture after about line 85 (from the swift code). After that, I see the Google Sign in pop up for a split second before vanishing. I don't seem to be able to debug it from there. It has got me baffled. |
After doing some testing, I can confirm that @webdog-rich's changes to
|
|
@DaveRicho would you mind sharing your |
|
@DaveRicho are there any errors logged when this happens? Are you able to share your sign in/refresh code? Need some more details on your setup. |
Hi @collindutter, Here is an is the capacitor.config.ts Here is the package.json: |
Hi @webdog-rich , I still don’t see any additional Xcode logging that is helpful (I might just be dumb though). Here is some of the sign in code: |
|
Sorry, been busy. Does |

Subsequent calls of GoogleAuth.signIn() now return the user object. This is useful when restoring a previous sign in. I use this to fetch a new token that I can then submit to Amazon Cognito Federated Identity pools.
Also added error handling.
This fixes #69 as
let googleUser = await Plugins.GoogleAuth.signIn(null) as any;hangs due to nothing being returned.My first PR :)