git-workflow icon indicating copy to clipboard operation
git-workflow copied to clipboard

GitHub is removing their Authorizations API endpoint

Open fc opened this issue 5 years ago • 4 comments

Expected Behavior:

No API error email

Actual Behavior:

Received email that says API is endpoint is being removed.

Steps to Reproduce the Problem:

  1. Authenticate with GitHub using the CLI
  2. Receive email that states:

On October 7th, 2020 at 22:32 (UTC) you or an application you used recently accessed the deprecated Authorizations endpoint on the GitHub API with the useragent python-requests/2.24.0.

We will remove the Authorizations API endpoint on November 13, 2020. If you accessed the API via password authentication, then we recommend you use the web flow to authenticate. Please check that your app uses the web flow for authentication https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow

You can learn more about these changes by visiting our developer blog https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/

fc avatar Oct 07 '20 22:10 fc

Thanks for flagging. Don't suppose you've looked into best practices for CLI based auth flows?

dpup avatar Oct 08 '20 00:10 dpup

We'll need to prompt users to get a personal access token: https://docs.github.com/en/free-pro-team@latest/developers/apps/authorizing-oauth-apps#non-web-application-flow https://docs.github.com/en/free-pro-team@latest/rest/overview/other-authentication-methods#basic-authentication

dpup avatar Oct 08 '20 00:10 dpup

i like the goreleaser approach to this, which checks either a GITHUB_TOKEN env variable or a ~/.config/goreleaser/github_token config file. https://goreleaser.com/environment/#api-tokens

nicks avatar Oct 12 '20 18:10 nicks

That's simpler too.

dpup avatar Oct 13 '20 03:10 dpup