identify, sessions still arrive, but nobody can tell whose they are. An investigation into “Priya cannot export her report” needs Priya’s session, and identify is how Hinto finds it.
When to call identify
Callidentify wherever the signed-in user becomes known. Call it again after a user switch, and call identify(null) at sign-out.
Optional fields
Since 0.3.0 you can pass optional fields that improve the customer record in the Hinto console:name is omitted, the customer record uses the identifier itself (for example the email address).
Identify for Native Support
Native Support requires anexternal_id identity. Identify with the same id the support token carries in its sub claim: the id your server signs, or, when the token comes from your sign-in provider, that provider’s user id (Supabase session.user.id, Firebase user.uid, Clerk userId, Auth0 user.sub):
name, email, or company from identify. Put them in the signed support token as the name, email, and company claims, read from your server session. See Issue a token on your authenticated server. A token from your sign-in provider gives the name, and the email only when the provider marked it verified. See Use your sign-in provider’s token.
When the support token’s sub differs from the subject the app passes, the SDK refuses the token with auth_invalid before it reaches Hinto.