mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-10 06:05:41 +00:00
ae44e7f4db
Custom HTTP tools now get more identity context. Each call sends the contact id, contact type, conversation UUID, and inbox id as headers, and the contact email is read live per call instead of snapshotting it at run start. set_contact_email is no longer blocked once an email is known. A customer who gives a different email (for example after their account could not be found) can now correct it. Changing the email clears the verification flag and any pending code first, so a failed clear can never leave the conversation verified against an unproven address. The prompt and tool descriptions were updated to guide this flow. Also fixes some widget and admin UI issues: prechat form validation now handles required numbers, checkboxes, and links correctly; tool header rows keep stable keys so removing a row does not shuffle inputs; the verification toggle uses form state directly; and the livechat inbox form shows the inbox UUID with a copy button.
Livechat widget JWT test page
A single-file page for testing the livechat widget's JWT contact authentication locally. Signs an HS256 JWT in the browser from an editable payload and loads the widget with it, or as an anonymous visitor with the JWT checkbox off.
Run
Serve the file over HTTP (the widget won't load from file://):
python -m http.server 8005
Open http://localhost:8005, then fill in:
- baseURL: your Libredesk instance (default
http://localhost:8001- Default points to the widget dev server, not the API server) - inboxID: the livechat inbox's UUID (from the inbox's installation snippet)
- Signing secret: the "Secret Key" from that inbox's Security tab
exp is set to now + 1 hour on every generate. Use "Clear session" to drop the
widget's cookies and start over as a brand-new visitor.