Skip to content

GitHub legacy token authentication is broken #283

@BloggerBust

Description

@BloggerBust

The most recent commit updated the construction of a GitHub instance in the connect controller, but did not pass the 'version' option. As a result it is not possible to use the legacy 'token' GitHub authentication. I created a commit to my own branch to try ad address this issue. However I am now getting an UnhandledPromiseRejectionWarning. The details are in the linked commit comments.

Are you in the process of tearing out support for token authentication? Any ideas why it is currently failing to work?

UPDATE:
I captured the error. It is returning a 404. I am not sure why yet though.

{ HttpError: Not Found
  at response.text.then.message (/var/task/user/index.js:130027:27)
  at <anonymous>
  at process._tickDomainCallback (internal/process/next_tick.js:228:7)
  name: 'HttpError',
  status: 404,
  headers: 
  { 'access-control-allow-origin': '*',
    'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type',
    connection: 'close',
    'content-encoding': 'gzip',
    'content-security-policy': 'default-src \'none\'',
    'content-type': 'application/json; charset=utf-8',
    date: 'Sun, 07 Apr 2019 13:02:39 GMT',
    'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
    server: 'GitHub.com',
    status: '404 Not Found',
    'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
    'transfer-encoding': 'chunked',
    'x-accepted-oauth-scopes': 'public_repo, repo, repo:invite',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'deny',
    'x-github-media-type': 'github.v3; format=json',
    'x-github-request-id': 'E876:4A18:21B074A:28D6BF7:5CA9F4EF',
    'x-oauth-scopes': '',
    'x-ratelimit-limit': '5000',
    'x-ratelimit-remaining': '4999',
    'x-ratelimit-reset': '1554645759',
    'x-xss-protection': '1; mode=block' },
  request: 
  { method: 'GET',
    url: 'https://api.github.com/user/repository_invitations',
    headers: 
    { accept: 'application/vnd.github.v3+json',
      'user-agent': 'Staticman agent octokit.js/16.8.0 Node.js/8.10.0 (Linux 4.14; x64)',
      authorization: 'token <MY-TOKEN>' },
    request: { timeout: 5000, validate: [Object] } },
  documentation_url: 'https://developer.github.com/v3/repos/invitations/#list-a-users-repository-invitations' }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions