auth: published plugin hard-codes isProduction, sessions drop after ~5 min on localhost
メンテナーはふだん 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-sessionandget-session?disableCookieCache=trueboth 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:
bos devin a child app (seen in nearbuilders.org), open http://localhost:3000.- Sign in.
- 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
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NEARBuilders/everything-dev のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
NEARBuilders/everything-dev#628 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NEARBuilders/everything-dev#400 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
NEARBuilders/everything-dev#636 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
NEARBuilders/everything-dev#634 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
NEARBuilders/everything-dev#632 ·
メンテナーはふだん 1 日以内に返信
NEARBuilders/everything-dev の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
keptinventory/kept#336 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
hemi-earn
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
vetro-protocol/vetro-monorepo#1013 ·
メンテナーはふだん 1 日以内に返信