diff --git a/docs/modules/ROOT/pages/servlet/oauth2/client/authorization-grants.adoc b/docs/modules/ROOT/pages/servlet/oauth2/client/authorization-grants.adoc index aea17b02a9..1623466180 100644 --- a/docs/modules/ROOT/pages/servlet/oauth2/client/authorization-grants.adoc +++ b/docs/modules/ROOT/pages/servlet/oauth2/client/authorization-grants.adoc @@ -276,9 +276,18 @@ public class OAuth2ClientSecurityConfig { .authorizationRequestRepository(this.authorizationRequestRepository()) ... ) - ); - return http.build(); + .oauth2Login(oauth2 -> oauth2 + .authorizationEndpoint(endpoint -> endpoint + .authorizationRequestRepository(this.authorizationRequestRepository()) + ... + ) + ).build(); } + + @Bean + public AuthorizationRequestRepository authorizationRequestRepository() { + return new CustomOAuth2AuthorizationRequestRepository(); + } } ----