Skip to content

feat(auth): passkeys / magicLink flags advertised in /auth/config but never consumed — build the UI or document them as reserved #2514

Description

@os-zhuang

背景

framework#2874 P2② 登录面审计发现:/api/v1/auth/config 广告的 8 个登录面 flag 中,passkeysmagicLink 在 objectui 只存在于类型声明(packages/auth/src/types.ts L119-120),没有任何组件消费——既无 passkey 登录/注册 UI,也无 magic-link 请求/消费流程。

这属于 #2874 主类的镜像:主类是「UI 宣传后端没有的能力」,这里是「后端广告了 UI 没有的能力」——flag 打开后部署者会以为登录页出现对应入口,实际什么都不会发生。

建议(二选一)

  1. 建 UI:LoginForm 按 features.passkeys === true 显示 passkey 登录入口(better-auth passkey 插件已有客户端 API);按 features.magicLink === true 显示「邮箱链接登录」入口;或
  2. 摘牌/文档化:短期内不做 UI 就在文档标注这两个 flag 为 reserved,并在 framework 侧评估是否暂停广告(避免部署者误判)。

备注

  • twoFactor 不在本 issue 范围:2FA 挑战由服务端 remediation 驱动(ADR-0069),flag 不被 LoginForm 读取是刻意设计。
  • framework 侧注册表:packages/spec/src/kernel/public-auth-features.ts(passkeys / magicLink 条目的 exempt.reason 指向本 issue)
  • 审计出处:framework#2874(P2② 登录面核对)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions