Skip to main content

Overview

useAccounts returns the list of all stored accounts and the currently active account. Use it to render an account switcher or display the signed-in user’s identity.

Usage Example

Returns

accounts
AccountSummary[]
Array of all stored accounts, derived from the accounts map in Redux state.
activeAccount
AccountSummary | null
The account currently marked as active, or null if no session is active.
accountCount
number
Total number of stored accounts.

AccountSummary Type

Integration Guide

For multi-account integration guidance, see Multi-Account.