Skip to content

Instantly share code, notes, and snippets.

@fjeldstad
fjeldstad / adal-app.js
Last active October 24, 2019 15:57
Example usage of login popup with adal.js
var authContext = new AuthenticationContext({
// ...
});
// Our custom asynchronous login function. Uses authContext.config.displayCall
// to show the Azure AD login page in a popup window, then periodically checks
// the popup window for the resulting hash + uses adal.js to handle it.
// For this to work, we need a dummy landing page to use as redirectUri.
// This can be an empty HTML page, but needs to have the same origin as the
// main window.