Skip to main content
AlonChat

Identity Verification

Identify logged-in users in the chat widget with the built-in JWT setup shown in the dashboard

Identity Verification#

Identity verification lets your website identify logged-in users to the chat widget. The setup is on the Chat widget install screen, including a secret key and copy-ready server and client examples.


Open Identity Verification#

StepWhere
1Open the agent dashboard
2Click Deploy
3Open Chat widget
4Open the Install tab
5Scroll to Identity verification

If you do not see a secret key yet, save the chat widget settings once. Saving generates the key.


What You Need#

  • Your website already has the widget installed
  • A backend that can generate a JWT for the signed-in user
  • The secret key shown in Identity verification

Setup Steps#

StepWhat you do
1Reveal and copy the Secret key from Deploy → Chat widget → Install
2Start from the Server-side (Node.js) example and generate a JWT on your backend
3Use the Client-side (JavaScript) example to call window.AlonChat("identify", { ... }) after the user signs in
4Call window.AlonChat("resetUser") when the user signs out
5Test the widget on your site with a logged-in user

What You See in the UI#

  • Secret key for server-side token signing
  • Controls to reveal the key, copy it, and rotate it
  • Server-side (Node.js) sample code
  • Client-side (JavaScript) sample code

Rotate key creates a new secret and invalidates JWTs signed with the old one. Update the server-side code immediately after rotating.


Important#

  • Keep the secret key on the server only.
  • Do not place the secret key in public client-side code.
  • Rotate the key if you think it was exposed.