gists
gists copied to clipboard
The library has support for accounts with two-factor auth?
Recently I become to experiment with the library for some project that I'm currently working, somehow when I use my GitHub account to do some tests I saw that an error comes and was from the two-factor auth (my GitHub account has the two-factor auth).
Try using a personal access token (you can create one by following this GitHub article).
Then use token
on the options instead of username/password
:
const gists = new Gists({ token: 'XXXXXXXXXXXXXX' });
Since the linked article specifically shows command line usage, you might be able to use the token as your password like this:
const gists = new Gists({
username: 'doowb',
password: 'XXXXXXXXXXXXX' // token
});
If you get it working, please let me know so I can update the documentation.
Thanks! It works perfectly!
Using the token
option in the Gist
constructor works correctly. Instead, using it as a password
threw a Bad credentials
error.
Thanks for letting me know. I'll get the docs updated soon.
Hi, again!
I'm currently working with the edit
method to update a single gist
. Using the token
method to auth throws an error: Error: Not Found
. I think it's because using a token don't let you update a gist
but in the GitHub API docs, doesn't say something about it.
Any idea?