fix(dropbox): don't add old token in refresh token logic
This commit is contained in:
@@ -18,6 +18,9 @@ const refreshToken = async ($: IGlobalVariable) => {
|
||||
params,
|
||||
headers: {
|
||||
Authorization: `Basic ${basicAuthToken}`
|
||||
},
|
||||
additionalProperties: {
|
||||
skipAddingAuthHeader: true
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@@ -3,7 +3,7 @@ import { TBeforeRequest } from '@automatisch/types';
|
||||
const addAuthHeader: TBeforeRequest = ($, requestConfig) => {
|
||||
requestConfig.headers['Content-Type'] = 'application/json';
|
||||
|
||||
if (!requestConfig.headers.Authorization && $.auth.data?.accessToken) {
|
||||
if (!requestConfig.additionalProperties?.skipAddingAuthHeader && $.auth.data?.accessToken) {
|
||||
requestConfig.headers.Authorization = `Bearer ${$.auth.data.accessToken}`;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user