Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

auth: published plugin hard-codes isProduction, sessions drop after ~5 min on localhost

Abierto
#635 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
57/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Start by locating the published auth plugin bundle and the source configuration that sets isProduction, then trace how bos dev supplies the runtime environment or base URL. Reproduce the reported sign-in on localhost and check session behavior after the five-minute cookie cache expires. Done when local HTTP sessions remain usable and production still uses secure cookies and cookie caching.

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

Descripción

The published auth plugin bundle has isProduction hard-coded to true (in the Zephyr bundle: authConfig: { ..., isProduction: !0 }). That turns on better-auth session.cookieCache with maxAge: 300 and secure cookies, including under bos dev on http://localhost.

What I see locally:

  • Sign in with Meteor on http://localhost → works.
  • About 5 minutes later, get-session and get-session?disableCookieCache=true both return null, and authed RPCs return 401.
  • The session row in the local auth pglite DB is still valid (7-day expiry), so the session itself isn't expired; the session token cookie just isn't usable on plain http once the cache cookie expires.

Repro:

  1. bos dev in a child app (seen in nearbuilders.org), open http://localhost:3000.
  2. Sign in.
  3. Wait ~5 minutes, reload → signed out; authed calls 401.

Suggested fix: derive isProduction at runtime instead of at build time, e.g. from NODE_ENV or from the base URL protocol (https: → production cookie settings). Keep secure cookies and the cookie cache on in production.

This might be related to the sign-in loop some people have seen when signing in for an org wallet with Meteor. I haven't confirmed that.

Lenguaje dominante
TypeScript
Estrellas
5
Forks
3
Merge medio
9 h 48 min
PR fusionados (30 d)
152

Preparar el entorno

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 NEARBuilders/everything-dev

Todos los issues de NEARBuilders/everything-dev

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.