Saturday, 11 January 2020

Single Sign On using MSAL in iOS app and Webview

I are trying to enable SSO in our native iOS application. The scenario is

  1. Implementing Sign in with microsoft using MSAL in organisational account
  2. After logging in to the iOS application we need to open another of our web app(added in Azure directory) in a webview

What all should we do to enable SSO in iOS application and open the microsoft service within the application with webview.

When i tried to implement this using MSAL, the user experience was the user logged into the application and when we tried to open webapp using webview it asked for login, instead we need the webview to silently login

In my webapp which is written in angular i call

  async getAccessToken(): Promise<string> {
    let result = await this.msalService.acquireTokenSilent(OAuthSettings.scopes)
      .catch((reason) => {
        this.alertsService.add('Get token failed', JSON.stringify(reason, null, 2));
      });

I have used the "@azure/msal-angular": "^0.1.4", in our angular application for signing with MSAL.

Any help will be appreciated.

DOCS

Microsoft Documentation



from Single Sign On using MSAL in iOS app and Webview

No comments:

Post a Comment