Session lifecycle: deeper invariant tests (expiry cleanup, refresh, updatedAt)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 半天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript
调研方向
Start from the existing 87-session-lifecycle.spec.ts added in #956 and read how its logout, concurrent-session and unauthenticated cases set up sessions. Then find the login, refresh and session-store code it exercises, to see where expired rows are cleaned up and where updatedAt is written. Done means four new tests pass against a real session store: expired-session cleanup on login, refresh extending expiry, rejection of a token whose session row was deleted, and updatedAt staying unchanged.
由索引模型根据 Issue 内容生成。
描述
Follow-up to #956 (auth hardening review). Missing tests on existing behavior.
Context
#956 added 87-session-lifecycle.spec.ts (logout destroys session; logging out one session leaves a concurrent one alive; unauth rejected). More session invariants remain unasserted.
Proposed coverage
- Expired sessions are cleaned up on next login.
- Session refresh extends expiry and returns an up-to-date user.
- A JWT/cookie whose underlying session row was terminated server-side is rejected.
updatedAtis NOT bumped on session create / logout / refresh (matches Better Auth semantics).
Acceptance
- Extend
87-session-lifecycle.spec.ts(or add integration tests) covering the above against a real session store.
- 主要语言
- TypeScript
- 星标
- 1.8k
- 派生
- 219
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 67
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SonicJs-Org/sonicjs 的其他 Issue
-
bug(admin/users): server error returns bare alert HTML causing black-shape visual artifact可能已有人在做 @lane711 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 76/100
SonicJs-Org/sonicjs#1211 ·
维护者通常 1 天内回复
-
area: api bug priority: P2
难度 2/5 1-3 小时 新手友好度 76/100
SonicJs-Org/sonicjs#1200 ·
维护者通常 1 天内回复
-
ResendProvider cannot send on Workers: unbound `fetch` stored as an instance property throws "Illegal invocation"可能已有人在做 @lane711 于 23 天前认领。 未关闭area: email bug priority: P1
难度 2/5 1-3 小时 新手友好度 72/100
SonicJs-Org/sonicjs#1099 ·
维护者通常 1 天内回复
-
Email plugin settings are never read: loadDbEmailSettings queries a v2 `plugins` table that does not exist in v3可能已有人在做 @lane711 于 23 天前认领。 未关闭area: email bug priority: P1
难度 2/5 1-3 小时 新手友好度 74/100
SonicJs-Org/sonicjs#1098 ·
维护者通常 1 天内回复
-
area: documentation bug documentation priority: P2
难度 2/5 1-3 小时 新手友好度 72/100
SonicJs-Org/sonicjs#1012 ·
维护者通常 1 天内回复
查看 SonicJs-Org/sonicjs 的全部 Issue
相似的 Issue
-
awaiting-final-review request-icon
难度 1/5 1 小时以内 新手友好度 70/100
homebridge/plugins#1376 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
mindfold-ai/Trellis#672 ·
-
p1 state:active track
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
StellarCanary/ProtocolCanary-Action#698 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
pear-devs/pear-desktop#4839 ·
维护者通常 1 天内回复