Skip to main content
function getAccessToken(options: {
  forceRefresh: boolean;
}): Promise<null | string>;
Gets the access token for the current user.

Parameters

ParameterTypeDescription
options{ forceRefresh: boolean; }The options for getting the token.
options.forceRefreshbooleanWhether to force a refresh of the token.

Returns

Promise<null | string> The access token for the current user, or null if no user is signed in.

Example

const accessToken = await getAccessToken();