Closed shanmukhavarma11 closed 3 years ago
Fitbit's token endpoint is rejecting your request for an access token credential as the request isn't authorized. That suggests that the correct credentials aren't being set when making the request. This happens in DefaultAuthorizationCodeTokenResponseClient
. You could try debugging your application with a breakpoint in this class to check the credentials that are being included in the request.
As an aside, while I'm not familiar with Fitbit's API, you seem to have quite a bit more code than I would expect to be necessary to integrate with its OAuth 2 support. I don't think you should need to do much more than is described in the documentation.
If you have any further questions, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. If you do follow up elsewhere, I'd recommend taking a bit of time to explain what your custom configuration is doing beyond what Spring Boot and Spring Security provide out of the box so that it's easier for those trying to help you to understand its purpose.
I had the same issue. It fixed by adding client-authentication-method in application.yml
I also have the same issue
I have solved the issue I will share my code
On Sat, 11 Dec 2021, 6:49 am Chamithfernando, @.***> wrote:
I also have the same issue
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-boot/issues/26884#issuecomment-991401620, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKQ3AF2NVLQF5ZDUPVR3QWLUQKRI5ANCNFSM46UPVFWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@shanmukhavarma11 do you mind sharing
@shanmukhavarma11 How did you solve this problem? I know the issue is old, but I'm having the same problem here after upgrading to springboot 3.1.5
I will send the code with in one hour
On Fri, Dec 1, 2023, 8:00 PM Daniel K. Guolo @.***> wrote:
@shanmukhavarma11 https://github.com/shanmukhavarma11 How did you solve this problem? I know the issue is old, but I'm having the same problem here after upgrading to springboot 3.1.5
— Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-boot/issues/26884#issuecomment-1836212005, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKQ3AF2D37EB4C7CBBRDGGDYHHSY3AVCNFSM46UPVFWKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBTGYZDCMRQGA2Q . You are receiving this because you were mentioned.Message ID: @.***>
@shanmukhavarma11 Did you send the code somewhere? I'm still having the issue
@danielkv @shanmukhavarma11 I am facing the same issue after upgrading to 3.0.13. Could you please share your knowledge on how you resolved this.
I am doing a health project where i need to implement fitbit login using oauth2.
fitbit authorization and ,token url are below
to get token from fitbit url is we use
Above are url for getting authorization code and access_token
I my problem I could able to implement the oauth2 flow using springboot but where I hit the url
I am getting error like
here is the application.yml file
Spring securitycongif class code
OAuth2AccessTokenResponseConverterWithDefaults class
}
websecurityconfig class
}
I will be repeating my problem again
when ever I give hit to the url localhost:8080/oauth2/authorize/fitbit or localhost:8080/login I am getting the error
[invalid_token_response] An error occurred while attempting to retrieve the OAuth 2.0 Access Token Response: 401 Unauthorized: [no body]
here is the image for the error enter image description here
Thank you