- Affected version
- 2.2.5 and earlier

Deprecating API authentication through query parameters
Get started with one of our guides, or jump straight into the API documentation.
developer.github.com
src/XF/ConnectedAccount/Service/GitHub.php
AUTHORIZATION_METHOD_HEADER_BEARER
.elseif (static::AUTHORIZATION_METHOD_HEADER_BEARER === $this->getAuthorizationMethod()) {
$extraHeaders = array_merge(array('Authorization' => 'Bearer ' . $token->getAccessToken()), $extraHeaders);
}
Authorization: token OAUTH-TOKEN
curl -H "Authorization: token OAUTH-TOKEN" https://api.github.com/user
$extraHeaders = array_merge(array('Authorization' => 'token ' . $token->getAccessToken()), $extraHeaders);
But at any moment this may stop working and for authorization they recommend using a tokenAs for GitHub, they support the token header "Bearer" because they allow that header to be used for other kinds of tokens beyond OAuth tokens, specifically personal access tokens and GitHub App tokens.
We use essential cookies to make this site work, and optional cookies to enhance your experience.