User accounts

v1.0.0

Identify the account a tester is using when they report a bug.

Identify the account a report is filed under so a triager can reproduce the bug. It renders as a dedicated Account section at the top of the created issue, and the role becomes a filterable label.

tsx
import { BugScreen } from '@bugscreen/react-native';
import { useEffect } from 'react';

// Set the current account (id required; role and email optional):
BugScreen.setUser({ id: 'pro-user-8823', role: 'admin' });

// Call it whenever your auth state changes — e.g. in a useEffect keyed on the user:
useEffect(() => {
  if (user) BugScreen.setUser({ id: user.id, role: user.role });
  else BugScreen.clearUser();
}, [user]);

Only role becomes a label (non-PII); id and email stay in the issue body. Pass email only when you want a contactable address in the tracker — nothing is auto-collected. The account is kept separate from custom data, so setCustomData and clearCustomData leave it untouched.