Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding linkdin provider issue #19

Open
owahi opened this issue Dec 3, 2019 · 2 comments
Open

adding linkdin provider issue #19

owahi opened this issue Dec 3, 2019 · 2 comments

Comments

@owahi
Copy link

owahi commented Dec 3, 2019

i tried to add authentification for linkdin, but LinkedIn OAuth2 access token api is returning only the access_token and expires_in values but not the token_type in the response. This results in the following error.

org.springframework.http.converter.HttpMessageNotReadableException: An error occurred reading the OAuth 2.0 Access Token Response: tokenType cannot be null; nested exception is java.lang.IllegalArgumentException: tokenType cannot be null

can you suggest a solution please !

@frne
Copy link

frne commented Dec 13, 2019

@owahi Probably unrelated to this specific tutorial. Unfortunately, Spring's error-reporting regarding the tokenType parameter in auth-token response, is not the most verbose.

This could mean that either, the provider does not return a proper tokenType (see org.springframework.security.oauth2.core.OAuth2AccessToken.TokenType) or that some provider setting is misconfigured.

I'd suggest to double-check your config. Otherwise, try to set a debug breakpoint in org.springframework.security.oauth2.core.OAuth2AccessToken's constructor and/or check org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse#accessToken for null.

See also:

@owahi
Copy link
Author

owahi commented Dec 16, 2019

thank you @frne for your awnser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants