My spring boot code for google login/logout runs successfully on Windows 10 and MacOS, but the logout doesn't work as expected when I run the same code (Eclipse project) on Windows 11. When I click the logout button, it returns the welcome page I specified in the code. But when I click the page, it doesn't prompt the google login screen. Instead, it looks like the browser automatically login with the same account. In this way, I cannot switch to a different google account. I also tried the same using Edge browser on Windows 11. Same issue. It is so strange. The exactly same code works fine on Windows 10 and MacOS.
`@Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.antMatcher("/**").authorizeRequests()
.antMatchers("/", "/welcome").permitAll()
.anyRequest().authenticated()
.and()
.oauth2Login()
.and()
.logout().logoutSuccessUrl("/welcome").permitAll();
}
}`
Comment From: wilkinsona
Thanks for the report. I don't think this has anything to do with Spring Boot itself as it's not involved in the OAuth 2 login flows. They are handled by Spring Security. As the problem is specific to Windows 11, I think the most likely cause is how Windows 11 behaves and/or is configured. If you'd like some help diagnosing that, you may want to post on Spring Security's Gitter channel or Stack Overflow.