Widget: fetch signed-in visitor tokens when a session is requested
維護者通常 1 天內回覆
@piyusshhjangid 已經在處理了。
開始於 2026年10月29日。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 63/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
- 領域
- api, authentication
研究方向
Start by locating the widget’s /session request and the existing userToken option, then read the nearby tests and configuration docs. Add an optional async provider while preserving static-token behavior, send the resolved token only to the configured ChatCops API, and keep signing secrets on the host server. Done means tests cover fresh tokens, provider failures, and static tokens, with the provider documented.
由索引模型根據 Issue 內容生成。
描述
What problem would this solve?
The widget accepts userToken as a fixed string and sends it when requesting a session. A page can stay open for a long time before the visitor opens the chat, so a short-lived signed token may expire before the first /session request. The server correctly rejects expired identity tokens, but the host page currently has no way to provide a fresh one at that point.
What would you like to happen?
Add an optional async token provider (or equivalent callback) that the widget calls when it is about to request /session, so the host can return a current signed token. Keep the existing string userToken behavior backwards compatible, send the resolved token only to the configured ChatCops API, and document that signing secrets must remain on the host server. Add tests for fresh tokens, provider failures, and the existing static-token option.
Contributing
- I'd like to work on this myself
- 主要語言
- TypeScript
- 星號
- 13
- 分支
- 7
- 平均合併
- 3 小時 39 分鐘
- 30 天內合併 PR
- 275
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
codercops/chatcops 的其他 Issue
-
Widget: support CSP nonces for injected styles可能已有人在做 @piyusshhjangid 今天認領。 未關閉enhancement
難度 4/5 3-5 天 新手友好度 55/100
codercops/chatcops#460 · 2 則留言 ·
維護者通常 1 天內回覆
-
Server: validate `rateLimit.windowMs` before creating the limiter可能已有人在做 @ashutoshpalhare 今天認領。 未關閉
codercops/chatcops#452 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Widget: a "New reply" button when the visitor has scrolled up可能已有人在做 @srujankaleru2007 於 1 天前認領。 未關閉enhancement hacktoberfest widget
codercops/chatcops#420 · 3 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
chatcops test: --url to test a deployed server可能已有人在做 @srujankaleru2007 於 1 天前認領。 未關閉enhancement hacktoberfest testing
codercops/chatcops#419 · 3 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
chatcops test: GitHub Actions reporter可能已有人在做 @mohithreddydonala37 於 1 天前認領。 未關閉enhancement hacktoberfest testing
codercops/chatcops#417 · 3 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 codercops/chatcops 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
-
area:desktop area:ui bug platform:macos
難度 2/5 1-3 小時 新手友好度 67/100
anthropics/claude-code#106183 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
-
難度 1/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
reproduced
難度 2/5 1-3 小時 新手友好度 72/100
anomalyco/opencode#60558 · 1 則留言 ·
維護者通常 1 天內回覆