fix(pipedrive): Skip adding auth header for refresh token
This commit is contained in:
@@ -19,6 +19,9 @@ const refreshToken = async ($: IGlobalVariable) => {
|
||||
params.toString(),
|
||||
{
|
||||
headers,
|
||||
additionalProperties: {
|
||||
skipAddingAuthHeader: true,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
|
@@ -1,6 +1,9 @@
|
||||
import { TBeforeRequest } from '@automatisch/types';
|
||||
|
||||
const addAuthHeader: TBeforeRequest = ($, requestConfig) => {
|
||||
if (requestConfig.additionalProperties?.skipAddingAuthHeader)
|
||||
return requestConfig;
|
||||
|
||||
if ($.auth.data?.accessToken) {
|
||||
requestConfig.headers.Authorization = `${$.auth.data.tokenType} ${$.auth.data.accessToken}`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user