Identify signed-in users in the widget
Attribute feedback, votes, and comments to real users by generating a signed identity on your server and passing it to the widget.
On this page
More in Core Features
- Manage feedback boards
- Use the roadmap
- Publish changelog entries
- Embed the feedback widget in your app
- Branding and customization
- Guest and anonymous feedback
- Internal comments and team collaboration
- Collect feedback with boards
- Move feedback through statuses
- Voting and comments
- Merge duplicate feedback posts
- Private boards
- Identify signed-in users in the widget
- Widget configuration options
- Widget JavaScript API reference
By default the widget treats visitors as guests. Identifying a signed-in user attaches their name and avatar to every post, comment, and vote they make.
How identification works
You generate a signed identity object on your server after the user logs in, then pass it to the widget in the browser. The signature is created with your Widget secret, which must never appear in browser code or public environment variables.
Finding your signing secret
Go to Settings → Workspace → Embed widget. Featul provisions the signing secret automatically when your workspace is created.
The server-side step
On your server, after login:
Take the user's
id,email,name, andimage.Build the payload and sign it with HMAC-SHA256 using your Widget secret.
Include an
expiresAttimestamp set five minutes from now.Return the signed identity object from an authenticated API endpoint.
The browser-side step
Fetch the signed identity from your authenticated endpoint.
Call
featul.identify(identity)with the returned object.When the user logs out, call
featul.identify(null)to clear the identity.
What happens with invalid identities
Unsigned, expired, or modified identities are treated as guests. Generate a fresh identity after login and before the five-minute signature window closes.
Was this helpful?