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

Add code to create Basic authorization for headers in request to oauth.io /oauth2/token URL #6

Open
nethsix opened this issue Jun 5, 2018 · 2 comments

Comments

@nethsix
Copy link

nethsix commented Jun 5, 2018

In src/oauth2/index.coffee, under token() method, there is a hard-coded basic auth token (this won't work anywhere), we need to replace this with the code that can create Basic authorization for the client using its clientId, and clientSecret returned from postauthorize.

@nethsix nethsix assigned ghost Jun 5, 2018
@nethsix
Copy link
Author

nethsix commented Jun 5, 2018

@OlehMO postauthorize response is something like:

{"status":"success","data":{"client_id":"{ client_id }","client_secret":"{
client_secret }","provider_id":"{ provider id provided by OAuth.io, which we store in config.js/config.local.js }","name":"Default app","user_id":"{ user_id (integer) }","app":"{ OAuth.io app id }", "id":"{ client_id }","redirect_uri":"https://oauth.io/auth"}}`

@nethsix
Copy link
Author

nethsix commented Jun 5, 2018

@OlehMO The code I'm talking about is in another branch. Sorry I did not add in the branch name.

https://github.com/oauth-io/oauthio-server-node/blob/add-logging-index-js/src/oauth2/index.coffee#L101

@ghost ghost removed their assignment Jun 14, 2018
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

1 participant