alexziskind1 / nativescript-oauth2

Other
86 stars 93 forks source link

iOS Google signIn wont work #189

Closed marvynorourkeTT closed 2 years ago

marvynorourkeTT commented 2 years ago

Make sure to check the demo app(s) for sample usage

Make sure to check the existing issues in this repository

If the demo apps cannot help and there is no issue for your problem, tell us about it

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

Unable to open the Google service login page only on iOS, no error message is displayed and the loginWithCompletion function returns nothing and never completes. When I launch the application with xCode I get a small warning but nothing more.

The warning: Warning: Attempt to present <SFSafariViewController: 0x7faa0e2cae00> on <UIViewControllerImpl: 0x7faa05c336c0> whose view is not in the window hierarchy!

Is there any code involved?

const googleProviderOptions = {
    openIdSupport: "oid-full",
    clientId: "xxxxxx.apps.googleusercontent.com",
    redirectUri: "com.googleusercontent.apps.xxxxxxx:/auth",
    urlScheme: "com.googleusercontent.apps.xxxxxx",
    scopes: ["email", "profile"],
  };
  return new providers.TnsOaProviderGoogle(googleProviderOptions);
mreall commented 1 year ago

@marvynorourkeTT Were you able to get it to work? I have a custom provider that works on Android, but won't open the browser when I tap the Sign In button on iOS.