github-tools / github-tools/github
How to use basic auth with 2-factor authentication?
Đang mở
enhancement
priority 4 (low)
PRs welcome
- Ngôn ngữ chính
- JavaScript
- Star
- 3.8k
- Fork
- 809
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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();
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.