Emit <AntiforgeryToken /> in the MainLayout sign-out form and remove .DisableAntiforgery() from the /auth/logout endpoint so UseAntiforgery() validates the token. A tokenless POST now returns 400, preventing CSRF-logout. Regression-guarded by AuthEndpointsTests.Logout_without_antiforgery_token_is_rejected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8.5 KiB
8.5 KiB