Widget: fetch signed-in visitor tokens when a session is requested
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 63/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- api, authentication
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- TypeScript
- Sterne
- 13
- Forks
- 7
- Ø Merge
- 3 Std. 10 Min.
- Gemergte PRs (30 T.)
- 339
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus codercops/chatcops
-
documentation
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
codercops/chatcops#555 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 25/100
codercops/chatcops#546 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 64/100
codercops/chatcops#542 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Server: validate `rateLimit.windowMs` before creating the limiterEvtl. vergeben @ashutoshpalhare hat das vor 2 Tagen übernommen. Offen
codercops/chatcops#452 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Widget: a "New reply" button when the visitor has scrolled upEvtl. vergeben @srujankaleru2007 hat das vor 3 Tagen übernommen. Offenenhancement widget
codercops/chatcops#420 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in codercops/chatcops
Ähnliche Issues
-
bug low priority
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
laaielichter/Godotwright#81 ·
Maintainer antworten meist innerhalb von 1 Tag
-
gebied: infra
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
VincentSmedinga/sc-heerenveen-fansite#538 ·
Maintainer antworten meist innerhalb von 1 Tag
-
CI grants a token it does not need, never cancels superseded runs, and cannot fail on lint warningsOffengood first issue help wanted type:infrastructure type:security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Open-Glassbeetle/glassbeetle#247 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag