Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Widget: fetch signed-in visitor tokens when a session is requested

未關閉
#461 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@piyusshhjangid 已經在處理了。

開始於 2026年10月29日。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
63/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
typescript

研究方向

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 內容生成。

描述

enhancement
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

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

codercops/chatcops 的其他 Issue

查看 codercops/chatcops 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。