Widget embed loader — use a stable slug so token rotation does not break live embeds
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- nextjs, typescript
Direzione di ricerca
Start by reading app/api/widget/chat/route.ts for the established public-endpoint abuse controls. Then trace the existing embed snippet and widget-token lookup to identify where slug resolution, owner/admin editing, and backward compatibility fit. Done means embeds can use a stable slug that resolves the current token, existing token-based snippets still work, and the resolve endpoint has the specified rate limits and body cap.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The widget embed snippet contains the raw widget token. That means rotating the token requires every customer to edit and redeploy the page it is embedded on — and for docs sites, to make a commit.
The problem
Rotation currently breaks every live embed until each one is manually updated. That makes rotation something people avoid, which is the opposite of what you want.
Proposed fix
Ship a loader script that takes a stable public slug instead of the token:
<script src="https://<host>/embed.js" data-site="acme-support"></script>
The loader resolves the slug to the current token at load time. Rotating the token then takes effect everywhere immediately, with no customer-side change.
Considerations
- The slug is a public identifier, exactly like the token is today — this changes the rotation story, not the trust model
- The resolve endpoint needs the same abuse controls as the other public widget endpoints (see
app/api/widget/chat/route.tsfor the established pattern: per-token and per-IP limits on the shared store, plus a body cap) - Existing token-based snippets must keep working; this is additive
- Slugs need to be unique per deployment and editable by owner/admin only
- Lingua principale
- TypeScript
- Stelle
- 16
- Fork
- 2
- Merge medio
- 7h 4m
- PR unite (30g)
- 157
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di answerLoops/answerLoops
-
Widget: match the chat bubble color to the rest of the widgetForse già presa @uchiha-suraj l’ha presa 5 giorni fa. Apertaenhancement help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
answerLoops/answerLoops#345 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Widget: make the chat window fit on small phonesForse già presa @anushreemehta6 l’ha presa 6 giorni fa. Apertaenhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
answerLoops/answerLoops#344 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
answerLoops/answerLoops#17 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
answerLoops/answerLoops#380 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di answerLoops/answerLoops
Issue simili
-
fix(frontend): correct VITE_IS_DEVELPOMENT typo in shared/app.ts and align dev environment flagsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
vicharanashala/ajrasakha#1439 ·
I maintainer di solito rispondono entro 1 giorno
-
Add: TV5Monde AsieApertaapproved check:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
backnotprop/plannotator#1932 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
ibm-granite/granite.build#504 ·
I maintainer di solito rispondono entro 2 giorni
-
reproduced
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
anomalyco/opencode#55676 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno