Skip to content
tsulliPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MSAL.js Sample - Authorization Code Flow in Single-Page Applications

About this sample

This developer sample is used to run basic use cases for the MSAL library. You can also alter the configuration in ./app/default/authConfig.js to execute other behaviors.

This is a modified version of the 'default' sample included in the msal-browser library, with additional scripts to demonstrate how to decode MSAL hashed logs live in the browser. The included client ID is the same provided in the original Microsoft sample.

How to run the sample:

Pre-requisites

Configure the application

  • Open ./app/default/authConfig.js in an editor.
  • Replace client id with the Application (client) ID from the portal registration, or use the currently configured lab registration.
    • Optionally, you may replace any of the other parameters, or you can remove them and use the default values.

Install npm dependencies for sample

  • In a command prompt, run npm install.

Running the sample

  1. In a command prompt at the root of the repository, run npm install.

  2. Next run npm run copy:msal-mappings to copy MSAL mapping files to the sample's default directory. This is required for MSAL logging to be decoded.

  3. In a command prompt, run npm start.

  4. Open a browser window and open the developer console to view logs.

  5. Navigate to http://localhost:30662 (or whatever port number specified) in the window with the console open. MSAL logs will be decoded with the copied mapping files, and will include additional information such as log level and timestamp.

  6. In the web page, click on the "Sign In" button and select either Sign in using Popup or Sign in using Redirect to begin the auth flow.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages