Skip to content

GitHub OAuth API requests fail due to access token sent as query parameter instead of Authorization header #713

@iceybubble

Description

@iceybubble

Description

GitHub deprecated authentication via access_token query parameters in Feb 2020 and now requires OAuth tokens to be sent using the Authorization: Bearer <token> header.

hello.js still appends the GitHub access token as a query parameter when making API requests (e.g. api('me')), which causes requests to fail with:

Must specify access token via Authorization header

Steps to Reproduce

  1. Configure GitHub OAuth with hello.js
  2. Call hello('github').login()
  3. Call hello('github').api('me')

Expected Behavior

GitHub API requests should include the access token via the Authorization header.

Actual Behavior

Access token is appended as a query parameter, resulting in a 401/403 error.

Reference

GitHub API deprecation notice:
https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/

Proposed Fix

Update GitHub provider implementation to send the OAuth token using the Authorization header instead of query parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions