“client_id” is missing when authenticate with Link

2019-07-11 02:03发布

问题:

I'm trying to use oauth2 with LinkedIn, but when callback from LinkedIn, spring boot oauth2 trying to authenticate and failed with "client_id is missing".

This is the tutorial that I use to make oauth2 https://www.callicoder.com/spring-boot-security-oauth2-social-login-part-1/ and I want to edit it to work with Linkedin

this is my application.yml

linkedin:

 clientId: 77smtc5d5vlp8h
 clientSecret: *******
 redirectUriTemplate: '{baseUrl}/oauth2/callback/{registrationId}'
 authorization-grant-type: authorization_code
 client-authentication-method: form
 scope:
   - r_basicprofile
   - r_emailaddress

provider:

linkedin:
 authorization-uri: https://www.linkedin.com/oauth/v2/authorization
 token-uri: https://www.linkedin.com/oauth/v2/accessToken
 user-info-uri: https://api.linkedin.com/v2/people/~?format=json