github-tools / github-tools/github

How to use basic auth with 2-factor authentication?

オープン
#287 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement priority 4 (low) PRs welcome
主要言語
JavaScript
スター
3.8k
フォーク
809
PR マージ指標
30日以内にマージされた PR はありません

説明

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();
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start by locating the library's authentication implementation and existing API documentation; the issue names no file or test. Confirm the supported authentication flow for accounts with 2FA and document a verified JavaScript example, with the expected successful API response as the completion check.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
api, authentication
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。