-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update applications API use to pass access token as body param instead of path param #1203
Update applications API use to pass access token as body param instead of path param #1203
Conversation
We're mutating the options below (but weren't we already?)
key = opts.delete(:client_id) || client_id | ||
secret = opts.delete(:client_secret) || client_secret | ||
|
||
as_app(key, secret) do |app_client| | ||
app_client.get "applications/#{client_id}/tokens/#{token}", opts | ||
app_client.post "applications/#{client_id}/tokens", opts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @oreoshake, @tarebyte,
The paths you are using here and returing 404. According to https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/#endpoints-affected , it should be singular token
, and not tokens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn, thanks for the heads up. I'm working on a PR to resolve this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got the tests passing but I've yet to actually try this against the live API 😄
🤦♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick fix. Seems to be working correctly now :)
@tarebyte Does this change mean that the newest version of Octokit will address this: https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/? |
Yup that should be it! |
See https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api and https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/
This PR updates the calls to the applications API calls. The current implementation uses deprecated endpoint, the new implementation uses the supported, but preview endpoints.
I've got the tests passing but I've yet to actually try this against the live API 😄