Skip to content

Interface: ServerConnect ​

Methods ​

getAccessToken() ​

ts
getAccessToken(): Promise<string>;

A valid access token, transparently refreshed when near expiry.

Returns ​

Promise<string>


getLoginUrl() ​

ts
getLoginUrl(options?): Promise<string>;

Build the URL to redirect the user to, and remember the request.

Parameters ​

ParameterType
options?LoginOptions

Returns ​

Promise<string>


handleCallback() ​

ts
handleCallback(url): Promise<CallbackResult>;

Complete the sign-in from the callback URL: verify, exchange, store tokens.

Parameters ​

ParameterType
urlstring

Returns ​

Promise<CallbackResult>


isAuthenticated() ​

ts
isAuthenticated(): Promise<boolean>;

Returns ​

Promise<boolean>


logout() ​

ts
logout(): Promise<void>;

Returns ​

Promise<void>