2.0.0 • Published 4 years ago

bs-msal v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

bs-msal

DEPRECATED. Please refer to https://github.com/SeaMonster-Studios/sms-reason

Bindings for microsoft-authentication-library-for-js (msal)

Usage

You'll notice that the intilization function has been simplified from UserAgentApplication to initApp, and that all parameters are named. All optional properties on the optional options object in the original msal have been moved to the root of the function call, also as named parameters. The only required parameters are clientId, authority, and tokenReceivedCallback.

Example

let authApp =
      Msal.initApp(
        ~clientId="CLIENT_ID_HERE",
        ~authority=
          "B2C_AUTHORITY_HERE",
        ~tokenReceivedCallback=
          (_errorDesc, _token, error, _tokenType) => {
            Js.log("Error in tokenReceivedCallback:");
            Js.log(error);
          },
        ~redirectUri="http://YOU_REDIRECT_URI",
        ~postLogoutRedirectUri="http://YOU_LOGOUT_REDIRECT_URI",
        ~storeAuthStateInCookie=false,
        ~validateAuthority=false,
        ~cacheLocation=`localStorage,
        (),
      );

    Js.log(authApp |> Msal.logger |> Msal.correlationId);
2.0.0

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago