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

authorization_code strategy does not send client_secret for get token request #115

Closed
silviurosu opened this issue Jun 25, 2018 · 2 comments

Comments

@silviurosu
Copy link

I had issues with getting the token. I noticed that Ruby client works fine. Then I investigated there requests and found out that the Ruby client send also the client_secret on the wire.

Although this can be accomplished by appending this param again to the get token request
client = OAuth2.Client.get_token!(client, code: "xxxxxxxxx", client_secret: "xxxxxxx")
this is not at all obvious and neither documented in the readme. I lost a few days debugging this issue.

I suggest that OAuth2.Strategy.AuthCode to do this by itself. Can I make a pull request with this?

@scrogson
Copy link
Member

@silviurosu I'm sorry to hear of your troubles. You're not the only one who has run into something like this. This issue has come up a few times before.

The problem is, this library attempts to provide strategies that follow the OAuth2 specification but allow for users to extend them, OR write a specific strategy for the target service.

I probably won't accept a PR that adds client_secret to the AuthCode strategy, but I will gladly accept a PR that outlines this issue in the README.

@silviurosu
Copy link
Author

@scrogson I understand your reasoning.
I searched for oauth2 docs and I see what client_secret is mentioned here: https://aaronparecki.com/oauth-2-simplified/#web-server-apps
This link is from oauth2.net

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