MDK Logo
UI Kitui-coreStores

authStore

Module-level singleton store holding the current session token and resolved permissions config. React adapters bind to this through `useAuth()`; non-React ca…

Module-level singleton store holding the current session token and resolved permissions config. React adapters bind to this through `useAuth()`; non-React callers can `authStore.getState()` directly.

import { createAuthStore } from "@tetherto/mdk-ui-core";

State

NameSignature
permissionsunknown | null
tokenstring | null

Actions

NameSignature
reset() => void
setPermissions(permissions: unknown | null) => void
setToken(token: string | null) => void