Skip to content
TraceItX Docs
Documentation

User identity

Who filed this? There are two answers, and only one of them is proof.

Updated

Self-declared

const { setUser } = useTraceItX();

setUser({ id: 'u_1042', email: 'jane@example.com', displayName: 'Jane' });
setUser(); // clears — call with NO argument

Clearing is calling with no argument, not null. That is a React Native codegen constraint rather than a style choice: the bridge cannot express a nullable struct parameter, so absence is the only way to say “no user”. null is a type error; if one slips through at runtime it clears as well.

This is an unauthenticated claim either way. It is genuinely useful — most reports come from your own QA and beta users — but it is not evidence.

Verified identity is not available here

The React Native SDK exposes no setIdentityToken and no identityToken config, so a report from RN can never reach the verified tier — it is self_declared when you call setUser and anonymous otherwise.

If verified attribution matters for your app, the native iOS and Android SDKs support it, and a receiver can always resolve identity itself from something your own backend signs.

The three tiers

A webhook receiver sees data.reporter, resolved server-side:

tierMeaning
verifiedA valid identity token was presented. This is proof.
self_declaredsetUser was called; nothing was verified.
anonymousNo person was resolved at all.

Use data.reporter, not data.report.reporter.user. The latter is whatever the app passed to setUser — an unauthenticated claim in every case, even when a valid token was also presented.

anonymous does not mean “unverified” — it means nobody was resolved. Treat the three as distinct states, not a confidence gradient. See Webhooks.

What actually reaches the report

Whatever you pass is projected down to id, email and displayName. Extra keys are dropped rather than carried, so passing a whole user object does not quietly ship your internal fields across the bridge.