diff --git a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java index 329ece6af75..885c7ca21a7 100644 --- a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java +++ b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java @@ -4506,7 +4506,9 @@ private ReactiveOAuth2UserService getOidcUserService( if (bean != null) { return bean; } - return new OidcReactiveOAuth2UserService(); + OidcReactiveOAuth2UserService reactiveOAuth2UserService = new OidcReactiveOAuth2UserService(); + reactiveOAuth2UserService.setOauth2UserService(getOauth2UserService()); + return reactiveOAuth2UserService; } private ReactiveOAuth2UserService getOauth2UserService() {