For an added layer of security, verify the identity of the user sending a message through the chat widget to prevent your customers from manually changing their email in the frontend to impersonate each other.

Pylon is not unique on this front.

Adding identity verification is optional, but encouraged.

1

Generate an Identity Secret

Generate it here and save it, this will be the only time you will see this key.

If you lose your key you’ll need to regenerate it and replace the key later.

2

Setup Backend

In your backend, hash the user’s email address using HMAC-SHA256 with the secret you just generated.

Here are some code snippets to help:

3

Send this hash to the Frontend and set it on the window object:

window.pylon.chat_settings.email_hash = HMAC_HASH

Now the user is verified when they open the chat!