Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#635 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
57/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript

調査の方向性

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.

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

説明

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.

主要言語
TypeScript
スター
5
フォーク
3
平均マージ
9時間 32分
マージ済み PR(30日)
152

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NEARBuilders/everything-dev のほかの issue

NEARBuilders/everything-dev の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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