GitHub deprecation notice for authentication via URL query parameters
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?
Using oauth_token is now no longer permitted on GitHub.com. Is there a workaround for the existing gem?
This format worked for my project:
github = Github.new org: 'MyOrganization', headers: {"Authorization" => "token #{my_access_token}"}