github icon indicating copy to clipboard operation
github copied to clipboard

GitHub deprecation notice for authentication via URL query parameters

Open jessiedeleon opened this issue 5 years ago • 2 comments

Github is emailing me about the deprecation of using access_token in the URL query parameters. https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/

I am using this codes to connect to GitHub: github = Github.new oauth_token: my_access_token, org: 'myOrg'

Now how can I add the with the GitHub changes where access token should be in the request header as Authorization: token my_access_token?

jessiedeleon avatar Mar 03 '21 22:03 jessiedeleon

Using oauth_token is now no longer permitted on GitHub.com. Is there a workaround for the existing gem?

jeroenkeppens avatar Sep 23 '21 02:09 jeroenkeppens

This format worked for my project: github = Github.new org: 'MyOrganization', headers: {"Authorization" => "token #{my_access_token}"}

jessiedeleon avatar Sep 23 '21 04:09 jessiedeleon