Failed Login should result in the appropriate HTTP-Status Code
- Lenguaje dominante
- JavaScript
- Estrellas
- 10.1k
- Forks
- 1.1k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Right now, If you try to login with weird credentials, you'll receive an HTTP 302 redirect and get back to the root of the project. Which will happily claim to be HTTP 200 OK. At no point is there a machine-readable mentioning of the failed login.
This is bad for at least two reasons: You can't properly script a login and browsers will offer to save your credentials, even if they are faulty.
I would like to suggest to change this to actually at some point reply with a HTTP 400-ish response code. Perhaps 401 Unauthorized.
Guía de contribución
Línea de trabajo
Empieza localizando el handler de solicitudes de login y su respuesta para credenciales no válidas; el issue no proporciona ninguna ruta de archivo ni de prueba. Reproduce un login fallido y verifica que devuelve una respuesta 4xx adecuada y legible por máquinas, en lugar de redirigir a una página que informa de 200 OK.
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
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100