From 977e2324283899e66fbdc036fbfba751cfa61734 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Tue, 24 Nov 2020 09:00:23 +0100 Subject: [PATCH] added offline token for token (#98) fixing: #63 --- src/utils/auth.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/auth.ts b/src/utils/auth.ts index 0c1976e9..3c097603 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -10,6 +10,7 @@ export interface Credentials { clientId: string; clientSecret?: string; totp?: string; + offlineToken?: boolean; } export interface Settings { @@ -45,6 +46,7 @@ export const getToken = async (settings: Settings): Promise => { grant_type: credentials.grantType, client_id: credentials.clientId, totp: credentials.totp, + scope: credentials.offlineToken ? 'offline_access' : '', }); const config: AxiosRequestConfig = { ...settings.requestConfig,