Skip to content

Commit 4564eee

Browse files
committed
quickstart functionality
1 parent 796fbfb commit 4564eee

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

articles/active-directory/develop/quickstart-v2-javascript-auth-code.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ This quickstart uses MSAL.js 2.0 with the authorization code flow. To use MSAL.j
5858
> 1. Under **Supported account types**, select **Accounts in any organizational directory and personal Microsoft accounts**.
5959
> 1. Select **Register**. On the app **Overview** page, note the **Application (client) ID** value for later use.
6060
> 1. In the left pane of the registered application, select **Authentication**.
61-
> 1. Under **Platform Configurations**, select **Add a platform**. A panel opens on the left. There, select the **Single-Page Applications** region.
62-
> 1. Still on the left, set the **Redirect URI** value to `http://localhost:3000/`.
61+
> 1. Under **Platform configurations**, select **Add a platform**. A panel opens on the right. There, select **Single-page application**.
62+
> 1. Still on the right, set the **Redirect URI** value to `http://localhost:3000/`.
6363
> 1. Select **Configure**.
6464
6565
> [!div class="sxs-lookup" renderon="portal"]
@@ -74,33 +74,32 @@ This quickstart uses MSAL.js 2.0 with the authorization code flow. To use MSAL.j
7474
#### Step 2: Download the project
7575

7676
> [!div renderon="docs"]
77-
> To run the project with a web server by using Node.js, [download the core project files](https://github.com/Azure-Samples/ms-identity-javascript-v2/archive/quickstart.zip).
77+
> To run the project with a web server by using Node.js, [download the core project files](https://github.com/Azure-Samples/ms-identity-javascript-v2/archive/quickstart-init.zip).
7878
7979
> [!div renderon="portal" class="sxs-lookup"]
8080
> Run the project with a web server by using Node.js
8181
8282
> [!div renderon="portal" class="sxs-lookup" id="autoupdate" class="nextstepaction"]
83-
> [Download the code sample](https://github.com/Azure-Samples/ms-identity-javascript-v2/archive/quickstart.zip)
83+
> [Download the code sample](https://github.com/Azure-Samples/ms-identity-javascript-v2/archive/quickstart-init.zip)
8484
8585
> [!div renderon="docs"]
8686
> #### Step 3: Configure your JavaScript app
8787
>
8888
> In the *app* folder, open the *authConfig.js* file and update the `clientID`, `authority`, and `redirectUri` values in the `msalConfig` object.
8989
>
9090
> ```javascript
91-
>
92-
> // Config object to be passed to Msal on creation
93-
> const msalConfig = {
94-
> auth: {
95-
> clientId: "Enter_the_Application_Id_Here",
96-
> authority: "Enter_the_Cloud_Instance_Id_HereEnter_the_Tenant_Info_Here",
97-
> redirectUri: "Enter_the_Redirect_Uri_Here",
98-
> },
99-
> cache: {
100-
> cacheLocation: "sessionStorage", // This configures where your cache will be stored
101-
> storeAuthStateInCookie: false, // Set this to "true" if you are having issues on IE11 or Edge
102-
> }
103-
> };
91+
> // Config object to be passed to Msal on creation
92+
> const msalConfig = {
93+
> auth: {
94+
> clientId: "Enter_the_Application_Id_Here",
95+
> authority: "Enter_the_Cloud_Instance_Id_HereEnter_the_Tenant_Info_Here",
96+
> redirectUri: "Enter_the_Redirect_Uri_Here",
97+
> },
98+
> cache: {
99+
> cacheLocation: "sessionStorage", // This configures where your cache will be stored
100+
> storeAuthStateInCookie: false, // Set this to "true" if you are having issues on IE11 or Edge
101+
> }
102+
> };
104103
> ```
105104
106105
> [!div renderon="portal" class="sxs-lookup"]
@@ -112,13 +111,13 @@ This quickstart uses MSAL.js 2.0 with the authorization code flow. To use MSAL.j
112111
> Modify the values in the `msalConfig` section as described here:
113112
>
114113
> - `Enter_the_Application_Id_Here` is the **Application (client) ID** for the application you registered.
115-
> - `Enter_the_Cloud_Instance_Id_Here` is the instance of the Azure cloud. For the main or global Azure cloud, enter https://login.microsoftonline.com/. For **national** clouds (for example, China), see [National clouds](authentication-national-cloud.md).
114+
> - `Enter_the_Cloud_Instance_Id_Here` is the instance of the Azure cloud. For the main or global Azure cloud, enter `https://login.microsoftonline.com/`. For **national** clouds (for example, China), see [National clouds](authentication-national-cloud.md).
116115
> - `Enter_the_Tenant_info_here` is set to one of the following:
117116
> - If your application supports *accounts in this organizational directory*, replace this value with the **Tenant ID** or **Tenant name**. For example, contoso.microsoft.com`.
118117
> - If your application supports *accounts in any organizational directory*, replace this value with `organizations`.
119-
> - If your application supports *accounts in any organizational directory and personal Microsoft accounts*, replace this value with `common`.
118+
> - If your application supports *accounts in any organizational directory and personal Microsoft accounts*, replace this value with `common`. **For this quickstart**, use `common`.
120119
> - To restrict support to *personal Microsoft accounts only*, replace this value with `consumers`.
121-
> - `Enter_the_Redirect_Uri_Here` is `http://localhost:3000`
120+
> - `Enter_the_Redirect_Uri_Here` is `http://localhost:3000/`
122121
>
123122
> > [!TIP]
124123
> > To find the values of **Application (client) ID**, **Directory (tenant) ID**, and **Supported account types**, go to the app registration's **Overview** page in the Azure portal.
@@ -147,14 +146,14 @@ This quickstart uses MSAL.js 2.0 with the authorization code flow. To use MSAL.j
147146
148147
> [!div renderon="docs"]
149148
>
150-
> `Enter_the_Graph_Endpoint_Here` is the endpoint that API calls will be made against. For the main (global) Microsoft Graph API service, enter `https://graph.microsoft.com`. For more information about Microsoft Graph on national clouds, see [National cloud deployment](https://docs.microsoft.com/graph/deployments).
149+
> `Enter_the_Graph_Endpoint_Here` is the endpoint that API calls will be made against. For the main (global) Microsoft Graph API service, enter `https://graph.microsoft.com/` (include the trailing forward-slash). For more information about Microsoft Graph on national clouds, see [National cloud deployment](https://docs.microsoft.com/graph/deployments).
151150
>
152151
> #### Step 4: Run the project
153152
154153
Run the project with a web server by using Node.js:
155154
156155
1. To start the server, run the following commands from within the project directory:
157-
```bash
156+
```console
158157
npm install
159158
npm start
160159
```
@@ -181,7 +180,7 @@ The MSAL.js library signs in users and requests the tokens that are used to acce
181180
182181
If you have Node.js installed, you can download the latest version by using the Node.js Package Manager (npm):
183182
184-
```bash
183+
```console
185184
npm install @azure/msal-browser
186185
```
187186

0 commit comments

Comments
 (0)