Subscription
Auth state-change subscription.
| Name | Type | Definition |
|---|---|---|
id | string | symbol | A 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) => void | The function called every time there is an event. |
unsubscribe | () => void | Call this to remove the listener. |
Example
{ "id": "subscription-id", "callback": "[Function]", "unsubscribe": "[Function]"}