WebAuth

WebAuth

new WebAuth()

Helper to perform Auth against Azure AD login page

It will use /authorize endpoint of the Authorization Server (AS) with Code Grant

Source:
See:

Methods

(async, static) authorize(options) → {Promise.<(BaseTokenItem|AccessTokenItem)>}

Starts the AuthN/AuthZ transaction against the AS in the in-app browser.

In iOS it will use SFSafariViewController and in Android Chrome Custom Tabs.

Source:
See:
Parameters:
Name Type Description
options Object

parameters to send

Name Type Attributes Description
scope String <optional>

scopes requested for the issued tokens. OpenID Connect scopes are always added to every request. openid profile offline_access

prompt String <optional>

(optional) indicates the type of user interaction that is required. The only valid values are 'login', 'none', 'consent', and 'select_account'.

ephemeralSession Boolean <optional>

SSO. It only affects iOS with versions 13 and above.

Returns:
Type:
Promise.<(BaseTokenItem|AccessTokenItem)>

(static) clearSession(options) → {Promise}

Removes Azure session

Source:
Parameters:
Name Type Description
options Object

parameters to send

Name Type Attributes Description
closeOnLoad Boolean <optional>

close browser window on 'Loaded' event (works only on iOS)

Returns:
Type:
Promise