[Feature]: Desktop app: passkeys

未关闭
#95 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
graphql, typescript

调研方向

Read the #80 epic and #83 first, then inspect the desktop app’s sign-in and Settings → Account flows and the existing GraphQL mutations. The issue leaves the CTAP2 crate and authenticator implementation to be selected and audited; map that work before estimating the implementation. Done means registering, signing in with, and deleting a hardware key, with keys working between web and desktop.

由索引模型根据 Issue 内容生成。

描述

enhancement

[!NOTE]
This issue was written by Claude (Claude Opus 5.5) from a planning session with @PhrolovaMoe. Part of #80, builds on #83. Read the epic first.

Area

Desktop app

Problem

The web signs in with passkeys, but a native Linux app has no browser WebAuthn. The server only accepts security keys (danger_set_user_presence_only_security_keys), so the desktop must talk to hardware keys itself.

Proposed solution
  • CTAP2 over USB HID, behind an Authenticator trait (Windows has webauthn.dll and macOS has AuthenticationServices for later). Pick the crate (ctap-hid-fido2, Mozilla's authenticator, or a small own implementation) by which passes the audit with fewer crates and supports CTAP2 PIN + user presence. NFC/BLE are out of scope.
  • Flows, with the existing GraphQL mutations:
    • sign in: startPasskeySignIn(username, profile) → finishPasskeySignIn(challenge, credential);
    • register: startPasskeyRegistration(name) → finishPasskeyRegistration(challenge, credential);
    • list and delete: passkeys, deletePasskey(id).
  • The server builds its relying party from the request's Origin header (webauthn_for in src/auth/passkeys.rs). The app sends Origin: <server origin> on these requests and builds clientDataJSON with that origin, as a browser on the server's page would. So passkeys work exactly where they work on web: https:// servers and http://localhost. Show the web's message otherwise. Confirm no server change is needed; if one is, make it minimal and keep web behaviour identical.
  • UI as on web: the passkey button on the sign-in screen (when the server's sign-in style allows it), "touch your key" and PIN prompts, the passkey list in Settings → Account.
  • Linux needs read/write access to the key's hidraw device. Most distros grant it through udev's FIDO rules. When access is denied, say so with a hint about the udev rule.
Done when

With David's hardware key: register a key from the app, sign in with it on a fresh server entry, delete it. A key registered on web signs in from the app and the other way round.

主要语言
TypeScript
星标
4
派生
1
平均合并
4 小时 49 分钟
30 天内合并 PR
5

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tinystream-dev/tinystream 的其他 Issue

查看 tinystream-dev/tinystream 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。