Open taivo1 opened 1 week ago
Hi @taivo1 ,
thank you for posting the issue and for using the plugin. I will check tonight if I can find the error. Currently I am wonderning why the callback method is async. This could explain why the callback is not called. You can try to call tryAutoOrOneTapSignInWithCallback without await.
David
Hi @taivo1 ,
I tested the code in the demo app and it is working. awaiting the method is correct because it ensures that you get feedback if there is an exception.
Before calling await GoogleOneTapAuth.addSignInActionToExistingButtonWithCallback('google-signin-existing-btn-parent', 'google-signin-existing-btn', onResult);
, you need to call GoogleOneTapAuth.initialize({ clientId: clientId });
, but I assume you did it because you would get an error result displayed in the developer console if not.
It could be an issue how you defined the existing button. In the demo project it is as follows.
<div id='google-signin-existing-btn-parent'>
<button id='google-signin-existing-btn' style={{ padding: 20, backgroundColor: '#3dc418' }}>Custom Sign-in Button</button>
</div>
If this did not help, mybe you could provide more of your code.
Hi @taivo1, there were some promises that did not return in case of an exception. I fixed that. Would be great if you could check if you get a proper error result now. The version that includes the fix is 6.1.7
Thanks, after quick testing with my app facing still the same issue, but will try to get you more proper example of my use case in a few days.
Here
https://github.com/inouiw/capacitor-native-google-one-tap-signin/blob/16485787309e806d2c0dba9d4f01d99719a653f9/src/web/GoogleIdentityServicesClient.ts#L60
and here:
https://github.com/inouiw/capacitor-native-google-one-tap-signin/blob/16485787309e806d2c0dba9d4f01d99719a653f9/src/web/GoogleIdentityServicesClient.ts#L53
the promise is not being handled, maybe it should reject the promise.
I'm having issues when calling tryAutoOrOneTapSignInWithCallback in Web, it just keeps hanging there once I close the dialog.