deleteUser performs a hard delete of the authenticated user. All associated data — wallets, embedded wallets, verified credentials, metadata — is permanently removed. Once the API call succeeds, the SDK automatically logs the user out and clears all client-side authentication state.
Account deletion is permanent and cannot be undone. All associated data will be irrecoverably deleted.
Requires an authenticated user — call only when dynamicClient.user is set (see Check if signed in).
The API call is gated by MFA: if the user has MFA enabled and the action requires step-up, you’ll see an MFA challenge surface. Handle it with isMfaRequiredForAction before invoking deleteUser.
On success, the client emits logout (with reason: 'user-deleted') and userChanged ({ user: null }). Subscribe via onEvent or use the React hook useUser to react to the change.