fix: remove bearer token from refresh token request for gmail
This commit is contained in:
@@ -12,7 +12,12 @@ const refreshToken = async ($) => {
|
||||
|
||||
const { data } = await $.http.post(
|
||||
'https://oauth2.googleapis.com/token',
|
||||
params.toString()
|
||||
params.toString(),
|
||||
{
|
||||
additionalProperties: {
|
||||
skipAddingAuthHeader: true,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
await $.auth.set({
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
const addAuthHeader = ($, requestConfig) => {
|
||||
if ($.auth.data?.accessToken) {
|
||||
if (
|
||||
!requestConfig.additionalProperties?.skipAddingAuthHeader &&
|
||||
$.auth.data?.accessToken
|
||||
) {
|
||||
requestConfig.headers.Authorization = `${$.auth.data.tokenType} ${$.auth.data.accessToken}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user