feat(identity): "sign out everywhere" via security stamp regeneration#188
Merged
antosubash merged 2 commits intoMay 10, 2026
Merged
Conversation
…tion Adds a user-initiated "Sign out everywhere" action that regenerates the ASP.NET Identity security stamp, signs out the current cookie, and publishes UserSignedOutEverywhereEvent so OpenIddict revokes any outstanding access/refresh tokens. Closes #179. Also fixes a latent bug in AuditConfigCacheInvalidator: Wolverine's default handler discovery only scans public types, so the existing internal handler was never being invoked on SettingChangedEvent.
Deploying simplemodule-website with
|
| Latest commit: |
0c3d485
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a9af5d70.simplemodule-website.pages.dev |
| Branch Preview URL: | https://feature-feat-identity-sign-s.simplemodule-website.pages.dev |
…-sign-security-stamp-regeneration-g4wfq # Conflicts: # packages/SimpleModule.Client/src/routes.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #179.
Summary
SignOutEverywhereEndpoint(POST/Identity/Account/Manage/SignOutEverywhere) regenerates the user's ASP.NET Identity security stamp, signs out the current cookie, and publishesUserSignedOutEverywhereEventover the Wolverine bus. OpenIddict subscribes and revokes any outstanding access/refresh tokens — going through the bus avoids a Users → OpenIddict reference (the module graph forbids it).Manage/Index.tsxwith a destructive "Sign out everywhere" button + confirmation dialog. Login page surfaces a friendly toast when redirected with?signedOutEverywhere=true.UsersModuleOptions.SecurityStampValidationInterval(default 1 minute, down from Identity's 30 minutes) so other devices' cookies die faster after the action.AuditConfigCacheInvalidatorwasinternal static, but Wolverine's default discovery scans only public types. Made itpublic staticso it actually runs onSettingChangedEvent. Same fix applied to the newUserSignedOutEverywhereHandler.WebApplicationFactoryClientOptionsoverload toCreateAuthenticatedClientfor tests that need to assert on a redirect itself.Test plan
dotnet test modules/Users/tests/SimpleModule.Users.Tests— 43/43 passing (3 new for this feature)dotnet test modules/OpenIddict/tests/SimpleModule.OpenIddict.Tests— 20/20 passingdotnet test modules/AuditLogs/tests/SimpleModule.AuditLogs.Tests— 37/37 passingdotnet test modules/Admin/tests/SimpleModule.Admin.Tests— 28/29 passing (1 unrelated pre-existing skip)/Identity/Account/Login?signedOutEverywhere=truewith the toast rendered. Server-side log confirmsUserSignedOutEverywhereEventwas dispatched and the OpenIddict handler revoked tokens.