Skip to content
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

SFSafariViewController not dismissing after login #219

Open
krunaldarji opened this issue Feb 16, 2023 · 0 comments
Open

SFSafariViewController not dismissing after login #219

krunaldarji opened this issue Feb 16, 2023 · 0 comments

Comments

@krunaldarji
Copy link

krunaldarji commented Feb 16, 2023

Which platform(s) does your issue occur on?

  • iOS

Sample Code:
var providers_1 = require("nativescript-oauth2/providers");

configureOAuthProviderMicrosoft() {
var microsoftProviderOptions = {
openIdSupport: "oid-full",
clientId: "XXXXXXXXXXX",
redirectUri: "msauth.com.XXX.XXX://auth",
scopes: ["openid"],
};
var microsoftProvider = new providers_1.TnsOaProviderMicrosoft(microsoftProviderOptions);
return microsoftProvider;
}

var microsoftProvider = this.configureOAuthProviderMicrosoft();
microsoftProvider.authority = "https://XXX.b2clogin.com/tfp/XXX.onmicrosoft.com/B2C_1_TestAD1";
nativescript_oauth2_1.configureTnsOAuth([microsoftProvider]);
var client = new nativescript_oauth2_1.TnsOAuthClient("microsoft");

  client.loginWithCompletion(function (tokenResult, error) {
    if (error) {
      console.log("back to main page with error: ");
      console.log(error);
    }
    else {
      console.log("back to main page with access token: ");
      console.log(tokenResult);
    }
  });    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant