From cc7b7637fa68e1d3994eacb947e35148266a1130 Mon Sep 17 00:00:00 2001 From: Max <112087149+minvoker@users.noreply.github.com> Date: Thu, 23 Apr 2026 21:25:03 +1000 Subject: [PATCH 1/3] Fix typos and add deployment note for redirect URIs --- .../tutorial-v2-nodejs-webapp-msal.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md b/docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md index 553ccb80835..fe1de516aee 100644 --- a/docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md +++ b/docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md @@ -120,8 +120,12 @@ Fill in these details with the values you obtain from Azure app registration por > [!WARNING] > Any plaintext secret in source code poses an increased security risk. This article uses a plaintext client secret for simplicity only. Use [certificate credentials](./certificate-credentials.md) instead of client secrets in your confidential client applications, especially those apps you intend to deploy to production. - `Enter_the_Graph_Endpoint_Here`: The Microsoft Graph API cloud instance that your app will call. For the main (global) Microsoft Graph API service, enter `https://graph.microsoft.com/` (include the trailing forward-slash). -- `Enter_the_Express_Session_Secret_Here` the secret used to sign the Express session cookie. Choose a random string of characters to replace this string with, such as your client secret. +- `Enter_the_Express_Session_Secret_Here`: the secret used to sign the Express session cookie. Choose a random string of characters to replace this string with, such as your client secret. +> [!IMPORTANT] +> Before deploying this app to Azure Web App or another hosting environment, update `REDIRECT_URI` and `POST_LOGOUT_REDIRECT_URI` to match your deployed application URL. +> +> Also ensure these redirect URIs are configured in your app registration in the Microsoft Entra admin center. Values used for local development, such as `http://localhost:3000/auth/redirect`, won't work after deployment unless your deployed app uses the same URI. 2. Next, create a file named *authConfig.js* in the root of your project for reading in these parameters. Once created, add the following code there: @@ -133,15 +137,15 @@ Fill in these details with the values you obtain from Azure app registration por :::code language="js" source="~/../ms-identity-node/App/auth/AuthProvider.js"::: -1. Next, create a new file named *auth.js* under the *routes* folder and add the following code there: +2. Next, create a new file named *auth.js* under the *routes* folder and add the following code there: :::code language="js" source="~/../ms-identity-node/App/routes/auth.js"::: -2. Update the *index.js* route by replacing the existing code with the following code snippet: +3. Update the *index.js* route by replacing the existing code with the following code snippet: :::code language="js" source="~/../ms-identity-node/App/routes/index.js"::: -3. Finally, update the *users.js* route by replacing the existing code with the following code snippet: +4. Finally, update the *users.js* route by replacing the existing code with the following code snippet: :::code language="js" source="~/../ms-identity-node/App/routes/users.js"::: From 7338623caf455a793a3573142905a52350a06e5b Mon Sep 17 00:00:00 2001 From: Max <112087149+minvoker@users.noreply.github.com> Date: Fri, 24 Apr 2026 03:02:21 +1000 Subject: [PATCH 2/3] Apply review suggestions for list formatting --- docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md b/docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md index fe1de516aee..e68f9404361 100644 --- a/docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md +++ b/docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md @@ -137,15 +137,15 @@ Fill in these details with the values you obtain from Azure app registration por :::code language="js" source="~/../ms-identity-node/App/auth/AuthProvider.js"::: -2. Next, create a new file named *auth.js* under the *routes* folder and add the following code there: +1. Next, create a new file named *auth.js* under the *routes* folder and add the following code there: :::code language="js" source="~/../ms-identity-node/App/routes/auth.js"::: -3. Update the *index.js* route by replacing the existing code with the following code snippet: +1. Update the *index.js* route by replacing the existing code with the following code snippet: :::code language="js" source="~/../ms-identity-node/App/routes/index.js"::: -4. Finally, update the *users.js* route by replacing the existing code with the following code snippet: +1. Finally, update the *users.js* route by replacing the existing code with the following code snippet: :::code language="js" source="~/../ms-identity-node/App/routes/users.js"::: From b1146cbb89990beeb645c1b6109f84c48083eba7 Mon Sep 17 00:00:00 2001 From: Max <112087149+minvoker@users.noreply.github.com> Date: Fri, 24 Apr 2026 03:03:03 +1000 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md b/docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md index e68f9404361..3728c0b6bf2 100644 --- a/docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md +++ b/docs/identity-platform/tutorial-v2-nodejs-webapp-msal.md @@ -120,10 +120,10 @@ Fill in these details with the values you obtain from Azure app registration por > [!WARNING] > Any plaintext secret in source code poses an increased security risk. This article uses a plaintext client secret for simplicity only. Use [certificate credentials](./certificate-credentials.md) instead of client secrets in your confidential client applications, especially those apps you intend to deploy to production. - `Enter_the_Graph_Endpoint_Here`: The Microsoft Graph API cloud instance that your app will call. For the main (global) Microsoft Graph API service, enter `https://graph.microsoft.com/` (include the trailing forward-slash). -- `Enter_the_Express_Session_Secret_Here`: the secret used to sign the Express session cookie. Choose a random string of characters to replace this string with, such as your client secret. +- `Enter_the_Express_Session_Secret_Here`: The secret used to sign the Express session cookie. Choose a random string of characters to replace this string with, such as your client secret. > [!IMPORTANT] -> Before deploying this app to Azure Web App or another hosting environment, update `REDIRECT_URI` and `POST_LOGOUT_REDIRECT_URI` to match your deployed application URL. +> Before deploying this app to Azure App Service or another hosting environment, update `REDIRECT_URI` and `POST_LOGOUT_REDIRECT_URI` to match your deployed application URL. > > Also ensure these redirect URIs are configured in your app registration in the Microsoft Entra admin center. Values used for local development, such as `http://localhost:3000/auth/redirect`, won't work after deployment unless your deployed app uses the same URI.