Skip to content

"Token passed to createTokenAuth is not a string" in response to basic authentication attempt #1881

Answered by gr2m
anthonyhaffey asked this question in Q&A
Discussion options

You must be logged in to vote

You also have to pass createBasicAuth to the Octokit constructor

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

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@oscard0m
Comment options

@gr2m
Comment options

@oscard0m
Comment options

Answer selected by anthonyhaffey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants