The access_token cookie is set without the `secure` flag outside NODE_ENV=production, including on HTTPS staging deploys

Abierto
#614 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@urielit1313-creator ya está trabajando en esto.

Desde el 13/10/2026.

  • #625 de @urielit1313-creator — abierto
  • #648 de @yggdrasilworld — cerrado sin fusionar
  • #690 de @PINYOPATTANAWASANPORN — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
20/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
typescript

Línea de trabajo

The cookie is set in githubCallback, where secure is tied to isProd, which is env === 'production'. Three open pull requests (#625, #648, #690) already target this, and #131 is related, so read those first and check whether any of them is still open for review before starting. Done means the access_token cookie gets secure whenever the request is served over HTTPS, based on req.secure with trust proxy or on APP_URL, and this is verified against a staging-style config.

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

Descripción

good first issue security

Problem

githubCallback sets secure: isProd, where isProd is env === 'production'. Staging or preview environments served over HTTPS but with NODE_ENV=staging/development issue the session cookie without Secure, so it can be sent over plain HTTP if any http:// URL on the domain is hit.

Suggested fix

Base secure on the request protocol (req.secure with trust proxy) or APP_URL starting with https.

Related: #131

Lenguaje dominante
TypeScript
Estrellas
2
Forks
90
Merge medio
31 min
PR fusionados (30 d)
20

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MergeFi/backend

Todos los issues de MergeFi/backend

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.