https://github.com/spring-projects/spring-boot/blob/v2.4.0/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/servlet/OAuth2WebSecurityConfiguration.java IMO, Use `HttpSessionOAuth2AuthorizedClientRepository` is more reasonable: the `authorizedClient` will cleared automatically after session expired.