OpaqueSession interface
Public opaque session surface returned to app code. Raw tokens are concealed internally by the Auth SDK.
Properties
| expires |
When the access token expires. |
| is |
Whether the current session is an anonymous session. |
| is |
Whether the session currently holds an access token that has not expired. This is |
| role | The user's role for the session, when known. |
| user | The authenticated user, or |
Property Details
expiresAt
When the access token expires.
expiresAt?: Date
Property Value
Date
isAnonymous
Whether the current session is an anonymous session.
isAnonymous: boolean
Property Value
boolean
isAuthenticated
Whether the session currently holds an access token that has not expired.
This is false while an expired token is waiting to be renewed, for example
after the device slept or was offline when the token was due to refresh.
In that state user is still set and auth.hasRefreshToken() is true;
the SDK renews the token automatically and emits AUTH_REFRESH when it does.
isAuthenticated: boolean
Property Value
boolean
role
The user's role for the session, when known.
role?: string
Property Value
string