mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-18 20:53:16 +08:00
fix(uds-auth): keep login error codes on QR login, name the scanned empNo (0.3.17)
0.3.16 mapped every post-scan failure to login_finalize_failed, hiding codes with their own message (bootstrap_required, account_disabled, registration_closed). Pass those through again and only fall back for unknown errors. The bootstrap_required message now includes the scanned employee number and how to proceed (UDS_AUTH_INITIAL_ADMIN or emergency account login). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
08a5520791
commit
e61f9c6336
4 changed files with 21 additions and 6 deletions
|
|
@ -167,7 +167,7 @@ export const MESSAGES = {
|
|||
'err.invalid_workspace_root': 'workspaceRoot 必须是绝对路径',
|
||||
'err.invalid_ttl': 'TTL 超出允许范围',
|
||||
'err.invalid_outbound_host': 'outbound 白名单 host 格式无效',
|
||||
'err.bootstrap_required': '系统尚未初始化管理员,请配置 UDS_AUTH_INITIAL_ADMIN',
|
||||
'err.bootstrap_required': '系统尚未初始化管理员(当前扫码工号 {empNo})。请设置环境变量 UDS_AUTH_INITIAL_ADMIN={empNo} 后重启 Harness;或先用「应急账号登录」进入,在设置中添加用户',
|
||||
'err.registration_closed': '未开放自动注册,请联系管理员',
|
||||
'err.raw_token_disabled': '原始凭证接口已关闭,请使用 outbound 代理',
|
||||
'err.caller_unauthenticated': '调用方未通过本地会话认证',
|
||||
|
|
@ -359,7 +359,7 @@ export const MESSAGES = {
|
|||
'err.invalid_workspace_root': 'workspaceRoot must be an absolute path',
|
||||
'err.invalid_ttl': 'TTL out of allowed range',
|
||||
'err.invalid_outbound_host': 'Invalid outbound host entry',
|
||||
'err.bootstrap_required': 'Admin not initialized; set UDS_AUTH_INITIAL_ADMIN',
|
||||
'err.bootstrap_required': 'Admin not initialized (scanned employee no. {empNo}). Set UDS_AUTH_INITIAL_ADMIN={empNo} and restart Harness, or sign in with the emergency account and add users in Settings',
|
||||
'err.registration_closed': 'Open registration is disabled; contact an admin',
|
||||
'err.raw_token_disabled': 'Raw credential API disabled; use outbound proxy',
|
||||
'err.caller_unauthenticated': 'Caller lacks a verified local session',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue