diff --git a/lib/Github/Client.php b/lib/Github/Client.php index 2052461335d..fb29f14be84 100644 --- a/lib/Github/Client.php +++ b/lib/Github/Client.php @@ -340,7 +340,7 @@ public function authenticate($tokenOrLogin, $password = null, $authMethod = null throw new InvalidArgumentException('You need to specify authentication method!'); } - if (null === $authMethod && in_array($password, [self::AUTH_URL_TOKEN, self::AUTH_URL_CLIENT_ID, self::AUTH_HTTP_PASSWORD, self::AUTH_HTTP_TOKEN, self::AUTH_JWT], true)) { + if (null === $authMethod && in_array($password, [self::AUTH_URL_TOKEN, self::AUTH_URL_CLIENT_ID, self::AUTH_HTTP_PASSWORD, self::AUTH_HTTP_TOKEN, self::AUTH_ACCESS_TOKEN, self::AUTH_JWT], true)) { $authMethod = $password; $password = null; }