Hooks
useUser
The useUser hook provides a convenient way to manage user identity and attributes, and access user-specific information like subscription status.
identify?(userId: string, options?: IdentifyOptions) => Promise<void>
update?(attributes: Record<string, any | null> | ((old: Record<string, any | null>) => Record<string, any | null>)) => Promise<void>
refresh?() => Promise<Record<string, any>>
setIntegrationAttributes?(attributes: IntegrationAttributes) => Promise<void>
getIntegrationAttributes?() => Promise<Record<string, string>>
getEntitlements?() => Promise<EntitlementsInfo>
getCustomerInfo?() => Promise<CustomerInfo>
customerInfo?CustomerInfo | null
setSubscriptionStatus?(status: SubscriptionStatus) => Promise<void>
subscriptionStatus?SubscriptionStatus
user?UserAttributes | null
restorePaywallAssignments?boolean?
status"UNKNOWN" | "INACTIVE" | "ACTIVE"
entitlements?Entitlement[]?
applicationInstalledAt?string
subscriptionsSubscriptionTransaction[]
nonSubscriptionsNonSubscriptionTransaction[]
entitlementsEntitlement[]
Snapshots are immutable and don't auto-update — fetch a fresh one with getCustomerInfo(), or stay current via useSuperwallEvents 's onCustomerInfoChange.
Managing Users
How is this guide?
Good Bad