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 deprecated query param authentication #210

Closed
andytson-inviqa opened this issue Feb 11, 2020 · 4 comments
Closed

GitHub deprecated query param authentication #210

andytson-inviqa opened this issue Feb 11, 2020 · 4 comments

Comments

@andytson-inviqa
Copy link
Contributor

andytson-inviqa commented Feb 11, 2020

Github has deprecated query parameter authentication (?access_token=....)

https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters

This appears to be still be used in this composer plugin, which is causing Github to notify via email all Github accounts being used by this plugin.

This will need a change to use Authorization: token (or basic) authentication to continue beyond obsoletion, and to stop the Github email notifications being sent.

The lines of code which are doing this appear to be at:

// is github
if (in_array($authKey, $githubDomains) && 'x-oauth-basic' === $auth['password']) {
$this->addParam('access_token', $auth['username']);
$this->user = $this->pass = null;
return;
}

There was some confusion in composer/composer#8586 as to the cause, when composer itself had fixed it in 1.9.3.

@trentza
Copy link

trentza commented Feb 11, 2020

added a PR #212 but @andytson-inviqa has tests with his fix.

@andytson
Copy link

release 0.3.10 contains the fix for this now

@hirak
Copy link
Owner

hirak commented Feb 17, 2020

Sorry for the late reply.
As already commented, please try 0.3.10.

@hirak hirak closed this as completed Feb 17, 2020
@archon810
Copy link

archon810 commented Mar 26, 2020

If I already have this installed, how does one update to 0.3.10? README doesn't mention updating - only installing. I know I can remove and reinstall, but updating would be easier.

Edit: Looks like running composer.phar global require hirak/prestissimo again does the update.

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

5 participants