No login
No accounts, or a public page. Nothing to do.
Same domain
Extra served from your site. Config only.
Other domain
Extra on its own hostname. One endpoint.
No login
Same domain
Serve Extra from a path on the site your users already sign into — sayacme.com/agents — and it reads the session they already have.
Works with any app that issues a session JWT — Open WebUI, Django, Rails, most
Node stacks. If your user id isn’t in the
sub claim, set
EXTRA_AUTH_CLAIM_USER_ID.Other domain
Browsers won’t send your session cookie to a different hostname, so your backend vouches for the user instead.401 — the widget falls back to an anonymous pass.
token-url is resolved like any other browser request: relative to the page.
That is correct in production, where your app and its API share an origin. If
your dev setup serves the frontend separately from your API, point it at the
same base your own frontend uses.When identity fails
Anything other than a clean token is reported — a wrong URL, an endpoint answering with the wrong shape, an unreachable host. The widget logs a warning and raises an event, so a broken integration cannot quietly look like a working anonymous chat:Signing in keeps the conversation
Someone who chats before logging in doesn’t lose it. On their first authenticated request the widget hands their pass over and those conversations move onto their account. Automatic, and it only happens once.Signing in and out
A normal page navigation needs nothing — the widget works out who the caller is on every load. A single-page app that signs a user in or out without reloading should say so, or the widget keeps the identity it already resolved:Settings
Rotating
EXTRA_AUTH_SECRET is safe: widgets fetch a fresh token on their next
request.