"Token passed to createTokenAuth is not a string" in response to basic authentication attempt #1881
-
|
I'm new to Octokit, so I assume this is something very simple I'm misunderstanding/overlooking: I'm trying to get a minimal example of authentication working in node js. However, when I run: Or a lot of variations of it, I always get: I get this whether or not this_password is a valid password associated with this_username The username and password I've tried are my github username and password. What am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Actually - it looks like using username and password is going to become deprecated anyway - I'll look into making the authorization token way work |
Beta Was this translation helpful? Give feedback.
-
|
You also have to pass const octokit = new Octokit({
authStrategy: createBasicAuth,
auth: {
username: this_username,
password: this_password
}
});But as you mentioned, basic auth is deprecated for the API and will soon be removed, I recommend against relying on it |
Beta Was this translation helpful? Give feedback.
You also have to pass
createBasicAuthto theOctokitconstructorBut as you mentioned, basic auth is deprecated for the API and will soon be removed, I recommend against relying on it