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

GitHub deprecation notice for authentication via URL query parameters #374

Open
jessiedeleon opened this issue Mar 3, 2021 · 2 comments

Comments

@jessiedeleon
Copy link

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?

@jeroenkeppens
Copy link

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

@jessiedeleon
Copy link
Author

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

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

2 participants