Skip to content

Align authentication-state revalidation with authorization semantics - #68640

Merged
kotlarmilos merged 1 commit into
dotnet:mainfrom
kotlarmilos:milosk/align-revalidation-auth-semantics
Aug 19, 2026
Merged

kotlarmilos merged 1 commit into
dotnet:mainfrom
kotlarmilos:milosk/align-revalidation-auth-semantics

Conversation

@kotlarmilos

Copy link
Copy Markdown
Member

This improves authentication-state revalidation by starting the loop when any identity on the principal is authenticated, rather than only the selected primary identity. This aligns the provider with framework authorization behavior for principals containing multiple identities.

Copilot AI lite review requested due to automatic review settings August 19, 2026 10:09
@kotlarmilos
kotlarmilos requested a review from a team as a code owner August 19, 2026 10:09
@kotlarmilos
kotlarmilos requested a review from javiercn August 19, 2026 10:09
@kotlarmilos kotlarmilos self-assigned this Aug 19, 2026
@kotlarmilos kotlarmilos added this to the 11.0-rc1 milestone Aug 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Blazor Server RevalidatingServerAuthenticationStateProvider to start its revalidation loop when any ClaimsIdentity on the current ClaimsPrincipal is authenticated, aligning revalidation triggering with framework authorization behavior for multi-identity principals.

Changes:

  • Switch the “should revalidate” gate from checking only User.Identity?.IsAuthenticated to checking User.Identities.Any(i => i.IsAuthenticated).
  • Add using System.Linq; to support the Any(...) check.
Show a summary per file
File Description
src/Components/Server/src/Circuits/RevalidatingServerAuthenticationStateProvider.cs Updates revalidation-loop start condition to treat any authenticated identity as sufficient.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

@kotlarmilos
kotlarmilos merged commit cb75bb4 into dotnet:main Aug 19, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants