Skip to content

Commit ff1d037

Browse files
authored
Blazor WASM security updates for 5.0 (#20162)
1 parent 933f4f3 commit ff1d037

5 files changed

Lines changed: 14 additions & 8 deletions

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ Record the following information:
5454
* App ID URI (for example, `api://41451fa7-82d9-4673-8fa5-69eff5a761fd`, `https://contoso.onmicrosoft.com/41451fa7-82d9-4673-8fa5-69eff5a761fd`, or the custom value that you provided)
5555
* Scope name (for example, `API.Access`)
5656

57-
The App ID URI might require a special configuration in the client app, which is described in the [Access token scopes](#access-token-scopes) section later in this topic.
58-
5957
### Register a client app
6058

6159
Follow the guidance in [Tutorial: Register an application in Azure Active Directory B2C](/azure/active-directory-b2c/tutorial-register-applications) again to register an AAD app for the *`Client`* app and then do the following:

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ Record the following information:
5555
* App ID URI (for example, `api://41451fa7-82d9-4673-8fa5-69eff5a761fd`, `https://contoso.onmicrosoft.com/41451fa7-82d9-4673-8fa5-69eff5a761fd`, or the custom value that you provide)
5656
* Scope name (for example, `API.Access`)
5757

58-
The App ID URI might require a special configuration in the client app, which is described in the [Access token scopes](#access-token-scopes) section later in this topic.
59-
6058
### Register a client app
6159

6260
Follow the guidance in [Quickstart: Register an application with the Microsoft identity platform](/azure/active-directory/develop/quickstart-register-app) and subsequent Azure AAD topics to register a AAD app for the *`Client`* app and then do the following:
@@ -271,6 +269,8 @@ Example:
271269
}
272270
```
273271

272+
[!INCLUDE[](~/includes/blazor-security/azure-scope-5x.md)]
273+
274274
::: moniker-end
275275

276276
::: moniker range="< aspnetcore-5.0"
@@ -303,8 +303,6 @@ Example:
303303

304304
::: moniker-end
305305

306-
[!INCLUDE[](~/includes/blazor-security/azure-scope-5x.md)]
307-
308306
### WeatherForecast controller
309307

310308
The WeatherForecast controller (*Controllers/WeatherForecastController.cs*) exposes a protected API with the [`[Authorize]`](xref:Microsoft.AspNetCore.Authorization.AuthorizeAttribute) attribute applied to the controller. It's **important** to understand that:
@@ -423,8 +421,12 @@ Specify additional scopes with `AdditionalScopesToConsent`:
423421
options.ProviderOptions.AdditionalScopesToConsent.Add("{ADDITIONAL SCOPE URI}");
424422
```
425423

424+
::: moniker range="< aspnetcore-5.0"
425+
426426
[!INCLUDE[](~/includes/blazor-security/azure-scope-3x.md)]
427427

428+
::: moniker-end
429+
428430
For more information, see the following sections of the *Additional scenarios* article:
429431

430432
* [Request additional access tokens](xref:blazor/security/webassembly/additional-scenarios#request-additional-access-tokens)

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ Specify additional scopes with `AdditionalScopesToConsent`:
182182
options.ProviderOptions.AdditionalScopesToConsent.Add("{ADDITIONAL SCOPE URI}");
183183
```
184184

185-
[!INCLUDE[](~/includes/blazor-security/azure-scope-3x.md)]
186-
187185
For more information, see the following sections of the *Additional scenarios* article:
188186

189187
* [Request additional access tokens](xref:blazor/security/webassembly/additional-scenarios#request-additional-access-tokens)

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,12 @@ Specify additional scopes with `AdditionalScopesToConsent`:
169169
options.ProviderOptions.AdditionalScopesToConsent.Add("{ADDITIONAL SCOPE URI}");
170170
```
171171

172+
::: moniker range="< aspnetcore-5.0"
173+
172174
[!INCLUDE[](~/includes/blazor-security/azure-scope-3x.md)]
173175

176+
::: moniker-end
177+
174178
For more information, see the following sections of the *Additional scenarios* article:
175179

176180
* [Request additional access tokens](xref:blazor/security/webassembly/additional-scenarios#request-additional-access-tokens)

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,12 @@ Specify additional scopes with `AdditionalScopesToConsent`:
162162
options.ProviderOptions.AdditionalScopesToConsent.Add("{ADDITIONAL SCOPE URI}");
163163
```
164164

165+
::: moniker range="< aspnetcore-5.0"
166+
165167
[!INCLUDE[](~/includes/blazor-security/azure-scope-3x.md)]
166168

169+
::: moniker-end
170+
167171
For more information, see the following sections of the *Additional scenarios* article:
168172

169173
* [Request additional access tokens](xref:blazor/security/webassembly/additional-scenarios#request-additional-access-tokens)

0 commit comments

Comments
 (0)