defunkt/gist

Query parameter authentication is deprecated on GitHub

GiorgioGhisotti opened this issue · 10 comments

Hello,

GitHub has deprecated access token authentication through query parameters. As far as I can tell this utility can't work with https authentication anymore short of asking the user for their credentials every time. Using ssh authentication could be a solution.

They mention in the email to use the Authorization HTTP header instead FWIW

The github email mentions the following message

Please use the Authorization HTTP header instead,
as using the `access_token` query parameter is deprecated.

Depending on your API usage, we'll be sending you this email ...

Visit 
https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters
for more information.

The web pages explains

GitHub is deprecating authentication to the GitHub API using query parameters,
such as using a access_token query parameter for OAuth user authentication
or a client_id/client_secret query  parameter for OAuth application authentication.

All authentication to the GitHub API should be done 
using HTTP basic authentication
see: 
https://developer.github.com/v3/auth/#via-oauth-and-personal-access-tokens.

As far as I can tell from the documentation, "basic authentication", even with OAuth, means that the user is queried for username and OAuth token after making the http request - there may be a way to automate that process but it feels a bit clunky and not the intended way of authenticating.

aren't they just saying use the header instead of the query parameter??

curl -H "Authorization: token OAUTH-TOKEN" https://api.github.com/user

like that?

This command is working for me curl -H "Authorization: token $GIT_TOKEN" https://api.github.com/gists/945a461e2abc33d222177a553bb1a0ae

Well in that case it should be pretty easy to fix, I didn't quite understand that prepending the token wold work.

looks like it's already committed -> 635b143

brew unlink gist && brew install -s gist --HEAD until brew has been updated

looks like it's already committed -> 635b143

@GiorgioGhisotti You can close this issue now