github-tools / github-tools/github

How to use basic auth with 2-factor authentication?

Abierto
#287 3 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement priority 4 (low) PRs welcome
Lenguaje dominante
JavaScript
Estrellas
3.8k
Forks
809
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
api, authentication
Tipo de issue
Documentación
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.