Skip to content

invalid_user_info_response after successful login(Java example) Resolved #16

Answered by a20103111
a20103111 asked this question in Q&A
Discussion options

You must be logged in to vote

I have solved the problem. The java example missing resolution of userinfo endpoint and need to add these codes:

SecurityConfig.java

@Bean
    public SecurityFilterChain securityFilterChain(
            HttpSecurity http, OAuth2AuthorizationRequestResolver resolver) throws Exception {
        http.authorizeHttpRequests(
                        authorize ->
                                authorize.requestMatchers("/api/user").authenticated().anyRequest().permitAll())
                .logout(logout -> logout.logoutSuccessUrl("/"))
                .exceptionHandling(
                        exception ->
                                exception.defaultAuthenticationEntryPointFor(
          …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by a20103111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant