You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory/develop/quickstart-v2-javascript-auth-code.md
+22-23Lines changed: 22 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,8 +58,8 @@ This quickstart uses MSAL.js 2.0 with the authorization code flow. To use MSAL.j
58
58
> 1. Under **Supported account types**, select **Accounts in any organizational directory and personal Microsoft accounts**.
59
59
> 1. Select **Register**. On the app **Overview** page, note the **Application (client) ID** value for later use.
60
60
> 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/`.
63
63
> 1. Select **Configure**.
64
64
65
65
> [!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
74
74
#### Step 2: Download the project
75
75
76
76
> [!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).
78
78
79
79
> [!div renderon="portal" class="sxs-lookup"]
80
80
> Run the project with a web server by using Node.js
> 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
+
> };
104
103
>```
105
104
106
105
> [!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
112
111
> Modify the values in the `msalConfig` section as described here:
113
112
>
114
113
> - `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).
116
115
>-`Enter_the_Tenant_info_here` is set to one of the following:
117
116
>- If your application supports *accounts inthis organizational directory*, replace this value with the **Tenant ID** or **Tenant name**. For example, contoso.microsoft.com`.
118
117
> - 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`.
120
119
> - 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/`
122
121
>
123
122
>> [!TIP]
124
123
>> 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
147
146
148
147
> [!div renderon="docs"]
149
148
>
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).
151
150
>
152
151
> #### Step 4: Run the project
153
152
154
153
Run the project with a web server by using Node.js:
155
154
156
155
1. To start the server, run the following commands from within the project directory:
157
-
```bash
156
+
```console
158
157
npm install
159
158
npm start
160
159
```
@@ -181,7 +180,7 @@ The MSAL.js library signs in users and requests the tokens that are used to acce
181
180
182
181
If you have Node.js installed, you can download the latest version by using the Node.js Package Manager (npm):
0 commit comments