docs: defineBetterAuthService reference never mentions opt-in user.* flags like deleteUser
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
在仓库中搜索随附的 RelKit 技能,并找到其 data-apis.md 参考文档中的 defineBetterAuthService 部分。了解该示例的维护方式,然后添加简短说明和 user.* 可选启用选项(例如 deleteUser)的示例。完成标准是:参考文档明确说明该选项默认禁用,并展示如何启用。
由索引模型根据 Issue 内容生成。
描述
Page or file
The bundled RelKit skill's defineBetterAuthService reference. In an installed project it lands at .agents/skills/relkit/references/data-apis.md (section ## defineBetterAuthService); I couldn't find the equivalent path in this monorepo's source, but a repo-wide search for the skill content should find it quickly.
Problem
- Missing
Details
The entire defineBetterAuthService example in the skill is:
import { defineBetterAuthService } from "@relkit/better-auth";
export default defineBetterAuthService({
baseURL: process.env.BETTER_AUTH_URL ?? "http://127.0.0.1:3000",
emailAndPassword: { enabled: true },
});
That's the only config surface the skill shows. It never mentions that Better Auth's user.* options exist or that several of them are opt-in and off by default - deleteUser in particular.
Why this is worth documenting: Better Auth defines POST /api/auth/delete-user unconditionally (its OpenAPI metadata is attached at endpoint-definition time, in better-auth/dist/api/routes/update-user.mjs), so it always shows up in the generated OpenAPI spec / Scalar docs for a RelKit app that scaffolds Better Auth. But the handler body gates on ctx.context.options.user?.deleteUser?.enabled and throws a bare APIError.fromStatus("NOT_FOUND") (empty body, no error code) when that flag isn't set - which it never is unless you explicitly add user: { deleteUser: { enabled: true } } }.
Net effect for anyone following only the skill's example: your app's Scalar docs advertise a working "delete my account" endpoint that 404s with no explanation, and there's nothing in the skill that would lead you to user.deleteUser to notice the gap. I only found the root cause by reading better-auth's source directly.
Suggested fix: extend the defineBetterAuthService reference section to at least name the existence of opt-in user.* feature flags (deleteUser, and similarly email-verification/password-reset's sender callbacks), with a one-line example like:
user: {
deleteUser: { enabled: true }, // off by default; route 404s until set
},
so an agent/developer scaffolding auth knows these exist and can decide for themself whether to turn them on, rather than discovering it as a silent 404 in production docs.
(Context, not something to fix here: the bare/empty-body 404 on a disabled Better Auth feature is better-auth's own behavior, not RelKit's - flagging only in case it's useful upstream.)
Found while doing an exhaustive route-by-route test pass (151 requests across all 81 OpenAPI endpoints) on an app scaffolded with @relkit/[email protected] / @relkit/[email protected].
- 主要语言
- TypeScript
- 星标
- 1
- 派生
- 0
- 平均合并
- 2 小时 45 分钟
- 30 天内合并 PR
- 64
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rel-kit/relkit 的其他 Issue
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
documentation good first issue
难度 1/5 1-3 小时 新手友好度 87/100
维护者通常 1 天内回复
-
documentation good first issue
难度 1/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
相似的 Issue
-
The sample email preview's ResizeObserver is never disconnected and keeps raising errors after leaving Settings可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
area:ui bug effort:S priority:P2
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Typo in WSL project description on Projects page可能已有人在做 @akhil9tiet 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 75/100
microsoft/opensource.microsoft.com#1066 · 1 条评论 ·
-
ArcGIS Maps SDK for JavaScript c-carousel calcite-design-tokens enhancement impact - p3 - not time sensitive needs triage
难度 2/5 1-3 小时 新手友好度 68/100
Esri/calcite-design-system#15565 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
linkwarden/linkwarden#1891 ·
维护者通常 1 天内回复