github-tools / github-tools/github
How to use basic auth with 2-factor authentication?
Aperta
enhancement
priority 4 (low)
PRs welcome
- Lingua principale
- JavaScript
- Stelle
- 3.8k
- Fork
- 809
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Is it possible to use basic auth with 2FA enabled on the user account? And if so, could someone provide me some brief sample code? I've tried adding a token field, but did not work. Got the "Bad Credentials" response from the API.
```
let github = new GitHub({
apiUrl: '**enterprise API endpoint here**',
username: parameter.username,
password: parameter.password,
token: parameter.token,
auth: 'basic'
});
let user = github.getUser();
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.