Error when integrate SSO in Spring Security Oauth2

created at 06-02-2022 views: 25


Error while integrating SSO with SpringSecurityOauth2

2022-05-29 15:45:56.492 INFO 20820 — [nio-8080-exec-9] o.s.s.o.p.e.AuthorizationEndpoint : Handling OAuth2 error: error=“invalid_grant”, error_description=“A redirect_uri can only be used by implicit or authorization_code grant types.”

The problem is that the authorizedGrantTypes type in the configuration of the authorization service is missing the authorization_code configuration.


    public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
                //Configure clientid
                //Configure clientsecret
                //Configure the validity period of the token
                //Configure the validity period of the refresh token
                //Used to jump after authorization is successful
                //Automatic authorization configuration
                //Authorization code mode Configure grant_type, indicating the authorization type
                //Configure grant_type in authorization mode, indicating that the authorization type is authorization code mode
created at:06-02-2022
edited at: 06-02-2022: