Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Cerrado
#461 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Saifjafri212213 ya está trabajando en esto.

Desde el 30/10/2026.

  • #476 de @Saifjafri212213 — fusionado

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
63/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
TypeScript
Estrellas
13
Forks
7
Merge medio
3 h 28 min
PR fusionados (30 d)
296

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de codercops/chatcops

Todos los issues de codercops/chatcops

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.