feat: 增加passkey支持 (#270)

* chore: add .pnpm-store to .gitignore

* feat: implement passkey authentication and management features

- Added passkey login and registration endpoints to the auth service.
- Introduced PasskeyManagement component for user passkey management.
- Updated localization files to include passkey-related strings in English and Chinese.
- Created utility functions for handling passkey operations in WebAuthn.
- Adjusted login page to support passkey login flow.
- Modified configuration for local development server.

* feat: enhance passkey management with modal input and localization updates

- Added a modal for entering passkey names during registration in the PasskeyManagement component.
- Updated English and Chinese localization files to include new strings for passkey name input.
- Improved user experience by validating passkey name input before registration.

* feat: enhance passkey login experience with localization updates

- Added new localization strings for passkey authentication errors and status messages in English and Chinese.
- Updated the login page to utilize localized strings for improved user feedback during passkey login attempts.

* feat: add name field to UserPasskey interface for enhanced user identification

* feat: integrate passkey support across login and settings

- Added passkey option to login configuration and updated related components to conditionally render passkey login button.
- Enhanced MyAccount and Logins components to manage passkey settings and display passkey management options based on configuration.
- Updated English and Chinese localization files to include new strings for passkey functionality.

* feat: added server version check for passkey
This commit is contained in:
haorwen
2025-12-12 21:25:49 +08:00
committed by GitHub
parent 344ad200df
commit 210a34b33c
16 changed files with 578 additions and 8 deletions
+6
View File
@@ -6,6 +6,12 @@
"metamask": "Sign in with MetaMask",
"password": "Sign in with Password",
"oidc": "Sign in with OIDC",
"passkey": "Sign in with Passkey",
"passkey_authenticating": "Authenticating...",
"passkey_error_not_supported": "Your browser doesn't support Passkey",
"passkey_error_cancelled": "User cancelled or timeout",
"passkey_error_no_passkey": "No passkey found for this account",
"passkey_error_failed": "Failed to login with passkey",
"no_account": "Don't have an account?"
},
"reg": {
+21
View File
@@ -285,11 +285,32 @@
"github_desc": "Allows members login with GitHub.",
"metamask": "Metamask",
"metamask_desc": "Allows members login with Metamask.",
"passkey": "Passkey",
"passkey_desc": "Allows members login with Passkey.",
"oidc": "OIDC",
"oidc_desc": "Allows members login with OIDC.",
"oidc_custom": "Custom",
"more_details": "Need more detail? See our <0>doc</0>."
},
"passkey": {
"title": "Passkeys",
"desc": "Manage your passkeys for passwordless login",
"add": "Add Passkey",
"adding": "Registering...",
"delete": "Delete",
"delete_confirm": "Are you sure you want to delete this passkey?",
"no_passkeys": "No passkeys registered yet",
"created": "Created",
"last_used": "Last used",
"success_add": "Passkey registered successfully",
"success_delete": "Passkey deleted successfully",
"error_add": "Failed to register passkey",
"error_delete": "Failed to delete passkey",
"error_not_supported": "Your browser doesn't support Passkey",
"error_cancelled": "User cancelled or timeout",
"error_exists": "Passkey already exists",
"enter_name": "Enter a name for this passkey"
},
"widget": {
"tip": "Extending VoceChat by embedding the vocechat widget SDK!",
"code": "Code Example",
+6
View File
@@ -6,6 +6,12 @@
"metamask": "MetaMask登录",
"password": "账号密码登录",
"oidc": "OIDC登录",
"passkey": "使用通行密钥登录",
"passkey_authenticating": "认证中...",
"passkey_error_not_supported": "您的浏览器不支持通行密钥",
"passkey_error_cancelled": "用户取消或超时",
"passkey_error_no_passkey": "未找到此账号的通行密钥",
"passkey_error_failed": "通行密钥登录失败",
"no_account": "没有账号?"
},
"reg": {
+21
View File
@@ -285,11 +285,32 @@
"github_desc": "允许用户使用 GitHub 登录",
"metamask": "Metamask",
"metamask_desc": "允许用户使用 Metamask 登录",
"passkey": "通行密钥",
"passkey_desc": "允许用户使用通行密钥登录",
"oidc": "OIDC",
"oidc_desc": "允许用户使用 OIDC 登录",
"oidc_custom": "自定义",
"more_details": "更多详情,移步 <0> 参考文档 </0> ."
},
"passkey": {
"title": "通行密钥",
"desc": "管理您的通行密钥以实现无密码登录",
"add": "添加通行密钥",
"adding": "注册中...",
"delete": "删除",
"delete_confirm": "确定要删除此通行密钥吗?",
"no_passkeys": "尚未注册通行密钥",
"created": "创建时间",
"last_used": "上次使用",
"success_add": "通行密钥注册成功",
"success_delete": "通行密钥删除成功",
"error_add": "通行密钥注册失败",
"error_delete": "通行密钥删除失败",
"error_not_supported": "您的浏览器不支持通行密钥",
"error_cancelled": "用户取消或超时",
"error_exists": "通行密钥已存在",
"enter_name": "请输入通行密钥名称"
},
"widget": {
"tip": "将挂件 SDK 内嵌到网页,实现 VoceChat 扩展!",
"code": "代码举例",