Methods
getUser()
Returns
|null
| User
isSignedIn()
Returns
Promise<boolean>
signOut()
Returns
Promise<void>
addAuthStateChangeCallback()
Parameters
| Parameter | Type |
|---|---|
callback | OnAuthStateChangeFn |
Returns
void
getToken()
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | { forceRefresh?: boolean; } | The options for getting the token. |
options.forceRefresh? | boolean | Whether to force a refresh of the token. |
Returns
Promise<null | string>
getTokenExpiration()
Returns
Promise<null | number>
getWalletSecretId()
Returns
Promise<string>
The wallet secret ID.
getXWalletAuth()
Parameters
| Parameter | Type |
|---|---|
options | { requestMethod: string; requestHost: string; requestPath: string; requestData?: Record<string, unknown>; } |
options.requestMethod | string |
options.requestHost | string |
options.requestPath | string |
options.requestData? | Record<string, unknown> |
Returns
Promise<string>
getAuthState()
Returns
|null
| AuthState
setAuthState()
Parameters
| Parameter | Type |
|---|---|
authState | AuthState |
Returns
Promise<void>
clearAuthState()
Returns
Promise<void>
ensureInitialized()
Returns
Promise<void>