Skip to content

Commit bfc5c27

Browse files
authored
Updates
1 parent 70b99e2 commit bfc5c27

File tree

1 file changed

+16
-26
lines changed

1 file changed

+16
-26
lines changed

aspnetcore/blazor/security/blazor-web-app-with-oidc.md

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -232,19 +232,6 @@ Inspect the sample app for the following features:
232232

233233
For more information on (web) API calls using a service abstractions in Blazor Web Apps, see <xref:blazor/call-web-api#service-abstractions-for-web-api-calls>.
234234

235-
:::moniker range="< aspnetcore-10.0"
236-
237-
<!-- UPDATE 10.0 - Check the PU issue for 10.0 work to resolve both issues.
238-
The docs issue is https://github.com/dotnet/AspNetCore.Docs/issues/34235. -->
239-
240-
## Custom cookie refresher (`CookieOidcRefresher.cs`)
241-
242-
The custom cookie refresher (`CookieOidcRefresher.cs`) implementation might need to be updated depending on your Identity Provider. For example, the refresher expects an ID token from the token endpoint. If the refresh token isn't an ID token with claims, the refresher can be updated with additional logic to continue to use the prior set of claims stored in the authentication cookie.
243-
244-
Additionally, work is scheduled for .NET 10 (November, 2025) on [`BlazorWebAppOidc AddOpenIdConnect with GetClaimsFromUserInfoEndpoint = true doesn't propogate role claims to client` (`dotnet/aspnetcore` 58826)](https://github.com/dotnet/aspnetcore/issues/58826) to refresh claims from the `/userinfo` endpoint.
245-
246-
:::moniker-end
247-
248235
## Client-side Blazor Web App project (`BlazorWebAppOidc.Client`)
249236

250237
The `BlazorWebAppOidc.Client` project is the client-side project of the Blazor Web App.
@@ -533,19 +520,6 @@ Inspect the sample app for the following features:
533520

534521
For more information on (web) API calls using a service abstractions in Blazor Web Apps, see <xref:blazor/call-web-api#service-abstractions-for-web-api-calls>.
535522

536-
:::moniker range="< aspnetcore-10.0"
537-
538-
<!-- UPDATE 10.0 - Check the PU issue for 10.0 work to resolve both issues.
539-
The docs issue is https://github.com/dotnet/AspNetCore.Docs/issues/34235. -->
540-
541-
## Custom cookie refresher (`CookieOidcRefresher.cs`)
542-
543-
The custom cookie refresher (`CookieOidcRefresher.cs`) implementation might need to be updated depending on your Identity Provider. For example, the refresher expects an ID token from the token endpoint. If the refresh token isn't an ID token with claims, the refresher can be updated with additional logic to continue to use the prior set of claims stored in the authentication cookie.
544-
545-
Additionally, work is scheduled for .NET 10 (November, 2025) on [`BlazorWebAppOidc AddOpenIdConnect with GetClaimsFromUserInfoEndpoint = true doesn't propogate role claims to client` (`dotnet/aspnetcore` 58826)](https://github.com/dotnet/aspnetcore/issues/58826) to refresh claims from the `/userinfo` endpoint.
546-
547-
:::moniker-end
548-
549523
## Client-side Blazor Web App project (`BlazorWebAppOidc.Client`)
550524

551525
The `BlazorWebAppOidc.Client` project is the client-side project of the Blazor Web App.
@@ -680,6 +654,22 @@ The important changes to the `LogInOrOut` component are demonstrated in the foll
680654
</div>
681655
```
682656

657+
:::moniker range="< aspnetcore-10.0"
658+
659+
## Token refresh
660+
661+
<!-- UPDATE 10.0 - Check the PU issue for 10.0 work to resolve both issues.
662+
The docs issue is https://github.com/dotnet/AspNetCore.Docs/issues/34235. -->
663+
664+
The custom cookie refresher (`CookieOidcRefresher.cs`) implementation updates the user's claims automatically when they expire. The current implementation expects to receive an ID token from the token endpoint in exchange for the refresh token. This ID token is then used to overwrite the user's claims.
665+
666+
The sample implementation doesn't include code for requesting claims from the `/userinfo` endpoint on token refresh. For more information, see [`BlazorWebAppOidc AddOpenIdConnect with GetClaimsFromUserInfoEndpoint = true doesn't propogate role claims to client` (`dotnet/aspnetcore` 58826)](https://github.com/dotnet/aspnetcore/issues/58826#issuecomment-2492738142).
667+
668+
> [!NOTE]
669+
> Some identity providers only return an access token when using a [refresh token](https://openid.net/specs/openid-connect-core-1_0.html#RefreshTokenResponse). The `CookieOidcRefresher` can be updated with additional logic to continue to use the prior set of claims stored in the authentication cookie.
670+
671+
:::moniker-end
672+
683673
## Cryptographic nonce
684674

685675
A *nonce* is a string value that associates a client's session with an ID token to mitigate [replay attacks](https://developer.mozilla.org/docs/Glossary/Replay_attack).

0 commit comments

Comments
 (0)