Skip to content

Commit dba1a0e

Browse files
authored
Blazor WASM security: Distinguish Kestrel & IIS ports (#18390)
1 parent d6b025a commit dba1a0e

5 files changed

Lines changed: 10 additions & 10 deletions

aspnetcore/security/blazor/webassembly/hosted-with-azure-active-directory-b2c.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ Follow the guidance in [Tutorial: Register an application in Azure Active Direct
6565
1. In **Azure Active Directory** > **App registrations**, select **New registration**.
6666
1. Provide a **Name** for the app (for example, **Blazor Client AAD B2C**).
6767
1. For **Supported account types**, select the multi-tenant option: **Accounts in any organizational directory or any identity provider. For authenticating users with Azure AD B2C.**
68-
1. Leave the **Redirect URI** drop down set to **Web**, and provide the following redirect URI: `https://localhost:5001/authentication/login-callback`
68+
1. Leave the **Redirect URI** drop down set to **Web**, and provide the following redirect URI: `https://localhost:{PORT}/authentication/login-callback`. The default port for an app running on Kestrel is 5001. For IIS Express, the randomly generated port can be found in the Server app's properties in the **Debug** panel.
6969
1. Confirm that **Permissions** > **Grant admin concent to openid and offline_access permissions** is enabled.
7070
1. Select **Register**.
7171

7272
Record the Application ID (Client ID) (for example, `11111111-1111-1111-1111-111111111111`).
7373

7474
In **Authentication** > **Platform configurations** > **Web**:
7575

76-
1. Confirm the **Redirect URI** of `https://localhost:5001/authentication/login-callback` is present.
76+
1. Confirm the **Redirect URI** of `https://localhost:{PORT}/authentication/login-callback` is present.
7777
1. For **Implicit grant**, select the check boxes for **Access tokens** and **ID tokens**.
7878
1. The remaining defaults for the app are acceptable for this experience.
7979
1. Select the **Save** button.

aspnetcore/security/blazor/webassembly/hosted-with-azure-active-directory.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ Follow the guidance in [Quickstart: Register an application with the Microsoft i
6262
1. In **Azure Active Directory** > **App registrations**, select **New registration**.
6363
1. Provide a **Name** for the app (for example, **Blazor Client AAD**).
6464
1. Choose a **Supported account types**. You may select **Accounts in this organizational directory only** (single tenant) for this experience.
65-
1. Leave the **Redirect URI** drop down set to **Web**, and provide the following redirect URI: `https://localhost:5001/authentication/login-callback`
65+
1. Leave the **Redirect URI** drop down set to **Web**, and provide the following redirect URI: `https://localhost:{PORT}/authentication/login-callback`. The default port for an app running on Kestrel is 5001. For IIS Express, the randomly generated port can be found in the Server app's properties in the **Debug** panel.
6666
1. Disable the **Permissions** > **Grant admin concent to openid and offline_access permissions** check box.
6767
1. Select **Register**.
6868

6969
Record the *Client app* Application ID (Client ID) (for example, `33333333-3333-3333-3333-333333333333`).
7070

7171
In **Authentication** > **Platform configurations** > **Web**:
7272

73-
1. Confirm the **Redirect URI** of `https://localhost:5001/authentication/login-callback` is present.
73+
1. Confirm the **Redirect URI** of `https://localhost:{PORT}/authentication/login-callback` is present.
7474
1. For **Implicit grant**, select the check boxes for **Access tokens** and **ID tokens**.
7575
1. The remaining defaults for the app are acceptable for this experience.
7676
1. Select the **Save** button.

aspnetcore/security/blazor/webassembly/standalone-with-azure-active-directory-b2c.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ Follow the guidance in [Tutorial: Register an application in Azure Active Direct
2929
1. In **Azure Active Directory** > **App registrations**, select **New registration**.
3030
1. Provide a **Name** for the app (for example, **Blazor Standalone AAD B2C**).
3131
1. For **Supported account types**, select the multi-tenant option: **Accounts in any organizational directory or any identity provider. For authenticating users with Azure AD B2C.**
32-
1. Leave the **Redirect URI** drop down set to **Web**, and provide the following redirect URI: `https://localhost:5001/authentication/login-callback`
32+
1. Leave the **Redirect URI** drop down set to **Web**, and provide the following redirect URI: `https://localhost:{PORT}/authentication/login-callback`. The default port for an app running on Kestrel is 5001. For IIS Express, the randomly generated port can be found in the app's properties in the **Debug** panel.
3333
1. Confirm that **Permissions** > **Grant admin concent to openid and offline_access permissions** is enabled.
3434
1. Select **Register**.
3535

3636
Record the Application ID (Client ID) (for example, `11111111-1111-1111-1111-111111111111`).
3737

3838
In **Authentication** > **Platform configurations** > **Web**:
3939

40-
1. Confirm the **Redirect URI** of `https://localhost:5001/authentication/login-callback` is present.
40+
1. Confirm the **Redirect URI** of `https://localhost:{PORT}/authentication/login-callback` is present.
4141
1. For **Implicit grant**, select the check boxes for **Access tokens** and **ID tokens**.
4242
1. The remaining defaults for the app are acceptable for this experience.
4343
1. Select the **Save** button.

aspnetcore/security/blazor/webassembly/standalone-with-azure-active-directory.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Register a AAD app in the **Azure Active Directory** > **App registrations** are
2121

2222
1. Provide a **Name** for the app (for example, **Blazor Standalone AAD**).
2323
1. Choose a **Supported account types**. You may select **Accounts in this organizational directory only** for this experience.
24-
1. Leave the **Redirect URI** drop down set to **Web**, and provide the following redirect URI: `https://localhost:5001/authentication/login-callback`
24+
1. Leave the **Redirect URI** drop down set to **Web**, and provide the following redirect URI: `https://localhost:{PORT}/authentication/login-callback`. The default port for an app running on Kestrel is 5001. For IIS Express, the randomly generated port can be found in the app's properties in the **Debug** panel.
2525
1. Disable the **Permissions** > **Grant admin concent to openid and offline_access permissions** check box.
2626
1. Select **Register**.
2727

@@ -32,7 +32,7 @@ Record the following information:
3232

3333
In **Authentication** > **Platform configurations** > **Web**:
3434

35-
1. Confirm the **Redirect URI** of `https://localhost:5001/authentication/login-callback` is present.
35+
1. Confirm the **Redirect URI** of `https://localhost:{PORT}/authentication/login-callback` is present.
3636
1. For **Implicit grant**, select the check boxes for **Access tokens** and **ID tokens**.
3737
1. The remaining defaults for the app are acceptable for this experience.
3838
1. Select the **Save** button.

aspnetcore/security/blazor/webassembly/standalone-with-microsoft-accounts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ Register a AAD app in the **Azure Active Directory** > **App registrations** are
2121

2222
1. Provide a **Name** for the app (for example, **Blazor Standalone AAD Microsoft Accounts**).
2323
1. In **Supported account types**, select **Accounts in any organizational directory**.
24-
1. Leave the **Redirect URI** drop down set to **Web**, and provide the following redirect URI: `https://localhost:5001/authentication/login-callback`.
24+
1. Leave the **Redirect URI** drop down set to **Web**, and provide the following redirect URI: `https://localhost:{PORT}/authentication/login-callback`. The default port for an app running on Kestrel is 5001. For IIS Express, the randomly generated port can be found in the app's properties in the **Debug** panel.
2525
1. Disable the **Permissions** > **Grant admin concent to openid and offline_access permissions** check box.
2626
1. Select **Register**.
2727

2828
Record the Application ID (Client ID) (for example, `11111111-1111-1111-1111-111111111111`).
2929

3030
In **Authentication** > **Platform configurations** > **Web**:
3131

32-
1. Confirm the **Redirect URI** of `https://localhost:5001/authentication/login-callback` is present.
32+
1. Confirm the **Redirect URI** of `https://localhost:{PORT}/authentication/login-callback` is present.
3333
1. For **Implicit grant**, select the check boxes for **Access tokens** and **ID tokens**.
3434
1. The remaining defaults for the app are acceptable for this experience.
3535
1. Select the **Save** button.

0 commit comments

Comments
 (0)