{{user.name}} and {{user.email}} hold in a procedure. Only the user id is signed, so the agent is told these are details your website supplied, not proof of who the visitor is. Each is put on a single line, with control characters removed, before the agent sees it. Nothing is passed on when the signature fails.
Set it up
1
Generate a signing secret
On Agents → your agent → Channels › Website chat › Install, under Verified visitors, choose Generate a signing secret. Store it on your server as
WIREDESK_SECRET. Never put it in the page.2
Sign the user id on your server
The signature is HMAC-SHA256 of the user id, hex-encoded, under the secret. The id you sign must be exactly the id you send.This signature covers the id only. To have the email trusted too, also sign it: see Sign the email too.
3
Pass it to the page
Set In a single-page app where the visitor signs in after the page loads, call When they sign out, call
window.wiredeskSettings before the widget script loads:identify instead:wiredesk("reset") so the next person at that browser does not see their conversation. It drops the identity and clears the conversation stored in the browser, even if you redirect straight afterwards. See signing out.Sign the email too
Thehash vouches for the user id, not for the name or email beside it, which the browser could change. That is enough to tie the conversation to the visitor’s id. It is not enough to tie it to their email address, so their chats stay apart from their emails, and it is not enough for actions that read or change a customer’s own account, such as Stripe billing: for those, an unsigned email counts for nothing and the agent emails the visitor a 6-digit code first.
To skip the code for signed-in visitors, sign the email as well and send it as email_hash: HMAC-SHA256 under the same secret of the user id, a colon, and the email trimmed and in lower case.
Require it
Require verification refuses anonymous visitors outright. Only turn it on for a widget that appears exclusively on signed-in pages — on a public page it stops the chat working.Rotating the secret
Rotating takes effect immediately. Deploy the new secret to your server first, then rotate, or signed-in visitors fail verification in between.Where the signature travels
The widget hands the identity to the conversation frame in the URL fragment, never the query string, and the frame sends it in a request header. It never appears in an access log or aReferer. See the security model for how the server checks it and who owns a verified conversation.