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 shown directly inside the widget embed screen, including a secret key and copy-ready server and client examples.


Open Identity Verification#

  1. Go to your agent dashboard.
  2. Click Deploy.
  3. Open Chat widget.
  4. Open the Embed tab.
  5. Scroll to Identity verification.
  6. If you do not see a secret key yet, save your chat widget settings once.

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 the Identity verification section

Setup Steps#

  1. Copy the Secret key from Deploy > Chat widget > Embed.
  2. Use the Server-side (Node.js) example as the starting point for generating a JWT on your backend.
  3. Use the Client-side (JavaScript) example to call window.AlonChat("identify", { ... }) after the user signs in.
  4. Call window.AlonChat("resetUser") when the user signs out.
  5. Test the widget on your site with a logged-in user.

What You See in the UI#

  • Secret key for server-side token signing
  • Show/Hide and Copy controls for the key
  • Server-side (Node.js) sample code
  • Client-side (JavaScript) sample code

Important#

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

Identity Verification | AlonChat Docs