getAccessToken MethodStatic
Get the current access token for this IModelHost, or a blank string if none is available.
getAccessToken(): Promise<string>
@note for web backends, this will always return a blank string because the backend itself has no token (but never needs one either.) For all IpcHosts, where this backend is servicing a single frontend, this will be the user's token. For ElectronHost, the backend obtains the token and forwards it to the frontend.
@note accessTokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value returned by this method may change over time throughout the course of a session.
Returns - Promise<string>
Defined in
- core/backend/src/IModelHost.ts Line 353
Last Updated: 16 April, 2024
Found something wrong, missing, or unclear on this page?
Raise an issue in our repo.