> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encorekit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# reset()

> Clear all locally stored Encore Web SDK state (user identity, attributes, queued signals, and any pending claim) and generate a fresh anonymous UUID. Call on logout or account switch.

Clears all locally stored SDK state and generates a new anonymous user id.

## Signature

```typescript theme={null}
function reset(): void
```

## What gets cleared

1. User identity: a fresh anonymous UUID is generated and persisted
2. All user attributes
3. Any pending (unredeemed) claim; a later `redeem()` resolves `{ status: 'none' }`
4. Queued signals and cached SDK data

<Warning>
  A pending deferred claim is lost on `reset()`: it can no longer be redeemed from this
  browser. Real (server-side) entitlements are unaffected; they belong to the user id they
  were earned under.
</Warning>

## When to call

* **Logout**, so the next visitor on this browser doesn't inherit the previous user's state.
* **Account switch**: `reset()` first, then [`identify()`](/publishers/web/sdk-reference/identify)
  the new user.

## Example

```javascript theme={null}
import Encore from '@encorekit/web-sdk';

async function handleLogout() {
  await clearAppSession(); // your own session teardown
  Encore.reset();
  window.location.href = '/login';
}
```

```javascript theme={null}
async function switchAccount(newUser) {
  Encore.reset();
  Encore.identify(newUser.id, { email: newUser.email });
}
```

## Related

* [`identify()`](/publishers/web/sdk-reference/identify): attach the next user's id
* [User Management quickstart](/publishers/web/quickstart/user-management): the full identity model
