![]() You've now bootstrapped a small React project using Create React App. Npm install react-bootstrap bootstrap # Install Bootstrap for styling Once you have Node.js installed, open up a terminal window and then run the following commands: npx create-react-app msal-react-tutorial # Create a new React appĬd msal-react-tutorial # Change to the app directory To continue with the tutorial and build the application yourself, move on to the next section, Create your project. Then, to configure the code sample before you execute it, skip to the configuration step. Prefer to download this tutorial's completed sample project instead? To run the project by using a local web server, such as Node.js, clone the ms-identity-javascript-react-spa repository: Microsoft Authentication Library for JavaScript v2 browser package Microsoft Authentication Library for JavaScript React Wrapper This tutorial uses the following libraries: Library Token acquisition and renewal are handled by the MSAL for React (MSAL React). In this scenario, after a user signs in, an access token is requested and added to HTTP requests in the authorization header. The library also enables applications to get access to Microsoft cloud services and Microsoft Graph. MSAL React enables React 16+ applications to authenticate enterprise users by using Azure Active Directory (Azure AD), and also users with Microsoft accounts and social identities like Facebook, Google, and LinkedIn. It uses the MSAL for React, a wrapper of the MSAL.js v2 library. The application you create in this tutorial enables a React SPA to query the Microsoft Graph API by acquiring security tokens from the Microsoft identity platform. Visual Studio Code or another code editor.MSAL React does NOT support the implicit flow. MSAL React supports the authorization code flow in the browser instead of the implicit grant flow. ![]() Add code to support user sign-in and sign-out.Register the application in the Azure portal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |