Enhance sign-out guidance#37198
Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands the Blazor security guidance around sign-out behavior and revalidation when using RevalidatingServerAuthenticationStateProvider, addressing gaps raised in #36662.
Changes:
- Adds a new “Authentication state management at sign out” section explaining circuit revalidation vs. cookie validity.
- Introduces Identity-specific guidance using
SecurityStampValidatorOptions.ValidationIntervalandUpdateSecurityStampAsync. - Adds cookie-auth (non-Identity) guidance with suggested logout-trigger approaches and cross-links to the cookie-auth article.
halter73
left a comment
There was a problem hiding this comment.
Copilot wanted to leave a bunch of inline comments for the following:
Compound-modifier hyphenation. Multiple instances of "30 minute" / "five minute" / "four minute" used as adjectives — per Microsoft style they should be hyphenated when modifying a noun: "30-minute window/interval/revalidation interval", "five-minute interval", "four-minute interval". Affects lines 545 (twice), 549, 551, 568, 570, 572, 576, 591, 593.
Also,
Repo guidance says to bump
ms.dateto today when more than 50 characters change. This PR adds ~80 lines, so this should be updated.ms.date: 05/28/2026
I personally don't care too much about this, but I guess it makes sense if that's what the style guide says.
|
Fair enough on the adjectives. I'll fix them up. I love the way Copilot has to be run multiple times to catch problems. I feel like it should be run two or three times on every PR to get ALL of its suggestions in. |
Co-authored-by: Stephen Halter <shalter+msft@microsoft.com>
Fixes #36662
Thanks, @MarvinKlein1508! 🚀 ... If we can get this right, we'll have closed an important gap in our coverage.
Stephen ... I may have butchered a little bit of your suggested direction 🙈, but I wanted to really flesh this one out in complete detail. The outline for this guidance explains the common
RevalidatingServerAuthenticationStateProvider.RevalidationIntervalsetting in the main section. Then, there are a pair of subsections ...SecurityStampValidatorOptions.ValidationInterval.Internal previews