github icon indicating copy to clipboard operation
github copied to clipboard

initialize user with access token

Open john012343210 opened this issue 3 years ago • 1 comments

import GitHub from 'github-api';

// basic auth
const gh = new GitHub({
   username: 'FOO',
   password: 'NotFoo'
});

how to initialize the user with an access token instead?

john012343210 avatar Jun 02 '22 12:06 john012343210

// token auth
const gh = new GitHub({
   username: 'FOO',
   token: 'YourToken'
});

kymtwyf avatar Jun 03 '22 01:06 kymtwyf