Documentation navigation

Subscription

Auth state-change subscription.

NameTypeDefinition
idstring | symbolA unique identifier for this subscription, set by the client. This is an internal identifier used for managing callbacks and should not be relied upon by application code. Use unsubscribe() to remove listeners.
callback(event: AuthChangeEvent, session: AccessTokenResponse | null) => voidThe function called every time there is an event.
unsubscribe() => voidCall this to remove the listener.

Example

{  "id": "subscription-id",  "callback": "[Function]",  "unsubscribe": "[Function]"}