Skip to content

feat(auth): support passkey (webauthn) login and credential management - #2530

Merged
BiFangKNT merged 4 commits into
masterfrom
feat/passkey-login
Sep 12, 2026
Merged

feat(auth): support passkey (webauthn) login and credential management#2530
BiFangKNT merged 4 commits into
masterfrom
feat/passkey-login

Conversation

@BiFangKNT

Copy link
Copy Markdown
Member

Summary

Support WebAuthn Passkey passwordless login and credential management.

Key Changes

  • Backend & Persistence:
    • Add webauthn dependency.
    • Add passkey_credentials table with Alembic migration 0024_passkey_credentials.
    • Implement single-use, TTL-pruned WebAuthn challenge lifecycle in UserService.
    • Implement registration options/verify, authentication options/verify, and passkey CRUD in UserService and UserRouterGroup.
    • Gracefully handle reverse-proxy origins and non-standard ports.
  • Frontend & UI:
    • Add @simplewebauthn/browser dependency.
    • Add 1-click Passkey login button on the login page (web/src/app/login/page.tsx).
    • Add Passkey management section in the Account Settings dialog (AccountSettingsPanel.tsx) supporting registering devices, viewing keys, renaming, and revoking.
    • Complete i18n support (zh-Hans, en-US, ja-JP).
  • Tests:
    • Add unit tests for challenge lifecycle and options generation.
    • Add API integration tests for public endpoints, protected endpoints, and reverse-proxy scenarios.

Comment thread tests/unit_tests/api/service/test_user_passkey.py Fixed
@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 36.89320% with 195 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/langbot/pkg/api/http/controller/groups/user.py 15.59% 92 Missing ⚠️
src/langbot/pkg/api/http/service/user.py 48.75% 82 Missing ⚠️
...tence/alembic/versions/0024_passkey_credentials.py 0.00% 21 Missing ⚠️

📢 Thoughts on this report? Let us know!

@BiFangKNT
BiFangKNT merged commit 9eb8683 into master Sep 12, 2026
23 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant