Fix: OAuth2 Access Token request is sent as GET (#1795) (#1808)

This commit is contained in:
Mateusz Pietryga 2024-03-22 14:12:00 +01:00 committed by GitHub
parent ae3c76a6c1
commit e278116356
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -208,6 +208,7 @@ const configureRequest = async (
interpolateVars(requestCopy, envVars, collectionVariables, processEnvVars);
const { data: authorizationCodeData, url: authorizationCodeAccessTokenUrl } =
await resolveOAuth2AuthorizationCodeAccessToken(requestCopy, collectionUid);
request.method = 'POST';
request.headers['content-type'] = 'application/x-www-form-urlencoded';
request.data = authorizationCodeData;
request.url = authorizationCodeAccessTokenUrl;
@ -216,6 +217,7 @@ const configureRequest = async (
interpolateVars(requestCopy, envVars, collectionVariables, processEnvVars);
const { data: clientCredentialsData, url: clientCredentialsAccessTokenUrl } =
await transformClientCredentialsRequest(requestCopy);
request.method = 'POST';
request.data = clientCredentialsData;
request.url = clientCredentialsAccessTokenUrl;
break;
@ -224,6 +226,7 @@ const configureRequest = async (
const { data: passwordData, url: passwordAccessTokenUrl } = await transformPasswordCredentialsRequest(
requestCopy
);
request.method = 'POST';
request.data = passwordData;
request.url = passwordAccessTokenUrl;
break;