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#
- Go to your agent dashboard.
- Click Deploy.
- Open Chat widget.
- Open the Embed tab.
- Scroll to Identity verification.
- 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#
- Copy the Secret key from Deploy > Chat widget > Embed.
- Use the Server-side (Node.js) example as the starting point for generating a JWT on your backend.
- Use the Client-side (JavaScript) example to call
window.AlonChat("identify", { ... })after the user signs in. - Call
window.AlonChat("resetUser")when the user signs out. - 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.