Skip to content

refactor(ids): Replace CpDaily campus authentication with local IDS Passkeys - #189

Merged
HeZeBang merged 11 commits into
HeZeBang:masterfrom
vvbbnn00:master
Nov 13, 2026
Merged

HeZeBang merged 11 commits into
HeZeBang:masterfrom
vvbbnn00:master

Conversation

@vvbbnn00

@vvbbnn00 vvbbnn00 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

主要变更

  • IDS认证改为本地Passkey登录: 新增纯 Dart 的 P-256/ES256、COSE/CBOR WebAuthn 实现,注册、登录、续期和解绑验证由客户端直接与学校IDS交互,不再通过TechPie后端登录校园账号;活动场馆的会话获取改为本地请求,Blackboard、课表等数据请求仍使用现有业务 API
  • 修复了密码输入组件的显示问题

兼容性

  • 移除旧 CpDaily 登录、续期及后台换 Cookie 的实现,旧配置保留迁移读取能力。设置页面提供重新绑定提示,账号详情提供“升级为 Passkey”入口。若旧账号密码可读取,用户确认后可复用升级。
  • IDS平台的标识统一为 ids,本地使用 third_party_ids。Cloud Sync schema 升至 v4,继续使用 accounts / tombstones,软件凭据存入 raw.credential 并通过现有端到端加密机制同步。新 Passkey 会话的 Cookie 仅保存在本机。
060c658a8652d7044615ee17c70ef86e_720 919492e8492c4d2d8fa78bdd6a173d00_720 bd85e433e452e1d92c5e3cdf4f74d20c_720 26c8945e8c2fbedbd653bd9146e01fd3_720

Use the shared secure field for grouped password inputs. Keep every typed character obscured, preserve paste, and let Flutter handle focus traversal once.
Release the native tab bar first-frame hold after the current frame. Remove the bottom navigation spacer while the keyboard is visible.
Register, sign and revoke software Passkeys directly with ShanghaiTech IDS. Store them as third-party IDS accounts and sync long-term credentials through Cloud Sync v4 while keeping session cookies local.

Keep saved legacy credentials only for confirmed migration. Remove CpDaily runtime renewal and backend cookie exchange, and obtain campus and OA sessions locally, including gym and contact requests. Add the migration UI, stable identity display and the required protocol and race regressions.
Connect local authentication sessions to the shared DebugLogger. Record request paths, status, timing and numeric business codes without query strings, authentication payloads, cookies or raw transport errors.
Keep eGate support in the roadmap alongside local IDS Passkey authentication.
Preserve cloud-only accounts and deletion records when backing up from a stale device. Give manual restore its own result and apply cloud bindings without uploading during restore.

Serialize account commits and release the eCard binding lock before sync callbacks, so renewal responses cannot overwrite restored accounts or deadlock sync.

Validation: flutter analyze; flutter test (737 passed, 1 skipped).
This reverts commit be9e995.

The repaired sync behavior predates the IDS Passkey migration. Restore the previous tree at the user request and retain the existing Passkey changes.
Merge HeZeBang/TechPie-flutter at 6916953, including deadline widgets, privacy consent, and timetable/deadline presentation fixes.

Keep local IDS software Passkey authentication. Map campus deadline identity changes to IDS so unbinding clears old Blackboard and exam data while retaining other cached sources.

Validation: 758 Flutter tests passed (1 skipped), 11 Swift tests passed, flutter analyze, and unsigned iOS/macOS Profile builds. Signed iOS packaging still requires the widget App Group provisioning update.
@github-project-automation github-project-automation Bot moved this to Backlog in TechPie Nov 8, 2026
@vvbbnn00
vvbbnn00 marked this pull request as ready for review November 8, 2026 17:53
Copilot AI balanced review requested due to automatic review settings November 8, 2026 17:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@HeZeBang
HeZeBang requested review from CNDY1390 and Honahec November 13, 2026 11:13
@HeZeBang
HeZeBang merged commit aaefb6a into HeZeBang:master Nov 13, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in TechPie Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants