GitHub has started sending out deprecation emails to apps using query parameters to authenticate, with instructions to switch over to Basic auth.
Relevant notice here:
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.
In this library, both Client::AUTH_URL_CLIENT_ID and Client::AUTH_URL_TOKEN authenticate via query parameters.
Client::AUTH_HTTP_PASSWORD uses Basic authentication, so I've switched my app over to that, but you may want to actively discourage/deprecate use of the query parameter auth methods (and perhaps rename AUTH_HTTP_PASSWORD to AUTH_HTTP_BASIC?)
To anyone searching for a solution to this, here's the change I made in my app:
- $client->authenticate($clientId, $clientSecret, Client::AUTH_URL_CLIENT_ID);
+ $client->authenticate($clientId, $clientSecret, Client::AUTH_HTTP_PASSWORD);
And the contents of the GitHub email (for search engines):
Click to expand
[GitHub API] Deprecation notice for authentication via URL query parameters
[...] your application used its client_id and client_secret (with the User-Agent php-github-api (https://github.com/KnpLabs/php-github-api)) as part of a set of query parameters to access an endpoint through the GitHub API [...]
Please use Basic Authentication instead as using OAuth credentials in query parameters has been deprecated.
Depending on your API usage, we'll be sending you this email reminder at most once every 3 days.
Just one URL that was accessed with a User-Agent combination will be listed in the email reminder, not all.
Visit https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters for more information.
GitHub has started sending out deprecation emails to apps using query parameters to authenticate, with instructions to switch over to Basic auth.
Relevant notice here:
In this library, both
Client::AUTH_URL_CLIENT_IDandClient::AUTH_URL_TOKENauthenticate via query parameters.Client::AUTH_HTTP_PASSWORDuses Basic authentication, so I've switched my app over to that, but you may want to actively discourage/deprecate use of the query parameter auth methods (and perhaps renameAUTH_HTTP_PASSWORDtoAUTH_HTTP_BASIC?)To anyone searching for a solution to this, here's the change I made in my app:
And the contents of the GitHub email (for search engines):
Click to expand