Skip to content

Default /logout doesn't work when securityMatcher used in Spring Security 6 #14382

Closed
@tonybob-tl

Description

@tonybob-tl

In Spring Security 6, (specifically Spring Boot 3.2, Spring MVC with Thymeleaf in my case) when securityMatcher is used, the default /logout POST or GET stops working. You need to provide a custom logout with a URL that is a child to the securityMatcher's URL.

Described the issue with example code at: stack overflow with workaround

Not sure if this issue is by design or not. Also, not sure if there is a better solution than I provided in the stack overflow. However, it would be good to indicate the need for the custom logout in the documentation so folks don't have to figure it out on their own.

Metadata

Metadata

Assignees

Labels

in: docsAn issue in Documentation or samplestype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions