Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
added offline token for token (#98)
Browse files Browse the repository at this point in the history
fixing: #63
  • Loading branch information
edewit authored Nov 24, 2020
1 parent 4b964fc commit 977e232
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface Credentials {
clientId: string;
clientSecret?: string;
totp?: string;
offlineToken?: boolean;
}

export interface Settings {
Expand Down Expand Up @@ -45,6 +46,7 @@ export const getToken = async (settings: Settings): Promise<TokenResponse> => {
grant_type: credentials.grantType,
client_id: credentials.clientId,
totp: credentials.totp,
scope: credentials.offlineToken ? 'offline_access' : '',
});
const config: AxiosRequestConfig = {
...settings.requestConfig,
Expand Down

0 comments on commit 977e232

Please sign in to comment.