Skip to content

fix(oauth): isolate synthetic devices per account - #101

Merged
smart-open merged 1 commit into
smart-open:docker_mainfrom
cls3389:codex/per-account-synthetic-devices
Oct 14, 2026
Merged

smart-open merged 1 commit into
smart-open:docker_mainfrom
cls3389:codex/per-account-synthetic-devices

Conversation

@cls3389

@cls3389 cls3389 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Isolate Trae Web-only OAuth synthetic device credentials per account.
  • Generate a new synthetic device identity for each OAuth login session and persist it after the final JWT uid is known.
  • Match the pending synthetic identity by device_id during AuthCode exchange, because the final uid is not yet available at that stage.
  • On successful OAuth, overwrite the account's device_map entry and synthetic device credential.
  • On account deletion, remove both the device_map entry and the per-account synthetic device credential, so a fresh OAuth creates a new device.
  • Keep the official ExchangeToken host allowlist from docker_main while using the per-account credential lookup.

Testing

  • cargo check -p aiwork-core
  • cargo test -p aiwork-core -- --test-threads=1
  • cargo test --workspace
  • npm test
  • npx tsc --noEmit
  • cargo build --release -p aiwork-server
  • Docker restart + /health verified: {"running":true,"status":"ok"}

@smart-open
smart-open merged commit 9ea59c0 into smart-open:docker_main Oct 14, 2026
3 checks passed
smart-open pushed a commit that referenced this pull request Oct 14, 2026
Qoder 积分余额/最早积分包到期/快照时间透传入池,smart 排序与 reserve 过滤生效(旧数据 fail-open);盲发候选全 409 时当轮重取列表 + 宽松档三档重学 + 补一轮盲发,消除全天 409 空转;Key「今日已用」四桶(Trae/WB/Custom/Qoder)并拉按 Key 跨桶求和;删除账号同步清理 device_map 设备指纹(移植 docker_main PR #101,持 DEVICE_MAP_LOCK 与签到/OAuth 回写互斥);API 管理 Key 调度配置弹框移除「issue #N」页面来源标注;CHANGELOG Unreleased 并入 3.7.12;docs/pending 新增自定义模型上游组负载均衡与熔断切换方案(v2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants