identify and reset
With <GatesProvider user={…}> you rarely call these yourself: the provider calls identify when user changes and reset when it becomes null.
What identify does
- Re-evaluates immediately. Every
useFlagsubscriber re-renders with the new identity. - Switches the rollout identity from the installation to
user.id, so a percentage rollout follows the person across their phones. - Makes
user.idanduser.<trait>available to rules. Traits arestring | number | boolean. - Clears the exposure dedupe, so the next read of each flag records exposure for the new user.
- Schedules a sync after a 500 ms debounce, so the server learns who is signed in. A burst of
identifyandresetcalls, as auth flows tend to produce, costs one request.
The server records the user, their traits and the device with the sync; that is what the People screens show. See People.
What reset does
Forgets the user, re-evaluates with the installation as identity, clears the exposure dedupe and schedules the same debounced sync.
Identity and bucketing
The bucketing identity is user:<id> when identified, otherwise inst:<installationId>. See Rollouts and bucketing.