我正在处理 google oauth2 注销。当 2 gmail 在浏览器中登录时,我正在获取 google 帐户屏幕以选择注销后要使用的帐户。但是当只有一个谷歌帐户登录时,我无法注销。它会自动登录并进入主屏幕。即使在浏览器中登录了一个 Gmail,如何停止自动登录并获得谷歌帐户选择屏幕?
@Override
public void configure(HttpSecurity httpSecurity) throws Exception {
httpSecurity.csrf().disable().antMatcher("/**").authorizeRequests()
.antMatchers("/", "/login","/home","/logout").authenticated()
.anyRequest().authenticated()
.and()
.logout()
.invalidateHttpSession(true)
.clearAuthentication(true)
.logoutSuccessUrl("/oauth2/authorization/google")
.deleteCookies("JSESSIONID")
.permitAll()
.and()
.oauth2Login()
.userInfoEndpoint()
.oidcUserService(oidcUserService());
}