Skip to content

docs(app): 標注「401 不註銷 device token」留下的洞已由後端補上(dispatch #65) - #84

Merged
thothawei merged 1 commit into
mainfrom
claude/token-owner-note
Jul 29, 2026
Merged

docs(app): 標注「401 不註銷 device token」留下的洞已由後端補上(dispatch #65)#84
thothawei merged 1 commit into
mainfrom
claude/token-owner-note

Conversation

@thothawei

Copy link
Copy Markdown
Owner

第十一輪定下「session 失效(401)不可去註銷」(那支 API 只會再回一次 401)——
這個決定是對的,但它留下一個代價:舊使用者的 token 列會留在後端

而 FCM token 是「這台裝置上的這個 App」的識別,換人登入時不會變,於是:

A 的 token 過期 → B 在同一台手機登入 → A 的行程通知與對話內容預覽全送到 B 的手機。

後端已於 2026-07-30 改成「一支 token 只能有一位主人
(dispatch PR #65,註冊時搬走別人身上的同一支),
App 這端維持不變仍然是安全的

本 PR 只在原決定旁邊標注清楚,免得下次有人以為那個決定是無代價的。

🤖 Generated with Claude Code

第十一輪決定 session 失效時不呼叫註銷(那支 API 只會再回一次 401)——
這讓舊使用者的 token 列留在後端,而 FCM token 換人登入時不會變,
結果是前一位的行程通知與對話內容預覽會送到下一位的手機。
後端已改成「一支 token 只能有一位主人」,App 這端維持不變仍然安全;
在原決定旁邊標注清楚,免得下次有人以為那個決定是無代價的。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@thothawei
thothawei merged commit 0d3aa79 into main Jul 29, 2026
2 checks passed
@thothawei
thothawei deleted the claude/token-owner-note branch July 29, 2026 18:23
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.

1 participant