Auth flow
The widget uses a dedicated widget JWT — separate from your application’s auth. Here’s how it works:Session context
The SDK sends aWidgetContextPayload to the widget on every auth handshake:
When re-authentication happens
The widget re-authenticates in these cases:- Initial load — when the iframe sends
hacktionbase:ready - First identify — when an anonymous user is identified (anonymous → known user)
- Account switch — when
identify()is called with a differentaccount.id
Identity verification (optional)
To prevent users from impersonating others, you can enable HMAC identity verification. Generate the hash server-side using your SDK secret:identify:
userHash is provided, the API validates it before accepting the identity.
