Documentation navigation

Auth

Listen for Auth state changes

Registers a callback for session and user events and immediately emits the initial session.

Parameters

(event: AuthChangeEvent, session: AccessTokenResponse | null)
callback(event: AuthChangeEvent, session: AccessTokenResponse | null) => void | Promise<void>
The callback invoked for each Auth state event.

Returns

subscriptionSubscription