[Feature]: Desktop app: passkeys

Aberta
#95 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
25/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
graphql, typescript

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
TypeScript
Estrelas
4
Forks
1
Merge médio
4h 49min
PRs com merge (30d)
5

Preparar o ambiente

  • Inclui um Dockerfile ou arquivo Docker Compose
  • Sem modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de tinystream-dev/tinystream

Todas as issues de tinystream-dev/tinystream

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.