Identity
Bootstrapware does not authenticate chat end users. Your host app asserts the user from your own session:
<Chat
user={{ id: "opaque-stable-id", name: "Ada" }}
authorToken={tokenFromYourBackend}
// ...
/>Anonymous chat is not supported. There is no guest composer.
User fields
| Field | Required | Notes |
|---|---|---|
| id | yes | Opaque and stable for the same person across sessions. Used for membership and unread. |
| name | no | Display only. |
| no | Display / moderation metadata only, not login. | |
| avatarUrl | no | Display only. http(s) URLs render; otherwise initials. Looked up from people then user. No avatar column on Hosted members. |
Optional people is the host-asserted directory for the picker and titles. It does not change who is allowed to send.
Threat model
Publishable keys (bsw_test_pub_ / bsw_live_pub_) are browser-visible by design. Anyone who can call Hosted widget routes with a leaked publishable key can forge author.id unless you require a signed authorToken. Treat that as a trust boundary:
- Restrict allowed origins so random sites cannot call your live Chat API from a browser.
- Enable
requireAuthorTokenon the app and mint tokens server-side with your secret key. - Never put secret keys (
bsw_*_sec_) in client bundles orNEXT_PUBLIC_/VITE_env vars. - On BYO, enforce authz on your API from the signed-in session. Do not trust the browser-supplied author alone.
authorToken
Mint a short-lived assertion with your Chat secret key, then pass it into the embed:
POST https://chat.bootstrapware.co/api/v1/author-tokens
Authorization: Bearer bsw_live_sec_...
{ "authorId": "user_123", "appId": "cha_...", "expiresInSec": 3600 }When the published app has requireAuthorToken: true, Hosted writes reject requests without a valid token that matches author.id (and optional appId). If a token is present, it is always verified even when the app does not require one.
What we never are
- Not an end-user IdP (no passwords, OAuth, or magic links for chat visitors).
- Not a substitute for your product login cookie or session.
- Not a channel that makes Hosted content private by default. Plain text and files; you moderate.
Related: Origins · Adapter · Security · Identity guide