Skip to main content

Interface: IAuthContextValue

Defined in: src/providers/react/types/hook-contracts.ts:29

Shape returned by the authentication context hook.

Remarks

Maps to useAuthContext() from @picsart/growth-rc.

Properties

refreshToken

refreshToken: () => Promise<string>

Defined in: src/providers/react/types/hook-contracts.ts:37

Forces a token refresh and returns the new token

Returns

Promise<string>


showLogin

showLogin: () => void

Defined in: src/providers/react/types/hook-contracts.ts:39

Opens the authentication login modal

Returns

void


signout?

optional signout?: () => void

Defined in: src/providers/react/types/hook-contracts.ts:41

Signs out the current user (optional — not all auth providers support signout)

Returns

void


status

status: string

Defined in: src/providers/react/types/hook-contracts.ts:35

Auth lifecycle status (e.g., "resolved", "pending", "expired")


tokenDataRef

tokenDataRef: ITokenDataRef

Defined in: src/providers/react/types/hook-contracts.ts:31

Ref containing the current auth token data


user

user: IContextUser | null

Defined in: src/providers/react/types/hook-contracts.ts:33

Current user identity