Skip to content

Commit

Permalink
Fix: OAuth2 Access Token request is sent as GET (#1795)
Browse files Browse the repository at this point in the history
  • Loading branch information
pietrygamat authored and Mateusz Pietryga committed Mar 19, 2024
1 parent 2b0ad29 commit 150f4cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/bruno-electron/src/ipc/network/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,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;
Expand All @@ -211,6 +212,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;
Expand All @@ -219,6 +221,7 @@ const configureRequest = async (
const { data: passwordData, url: passwordAccessTokenUrl } = await transformPasswordCredentialsRequest(
requestCopy
);
request.method = 'POST';
request.data = passwordData;
request.url = passwordAccessTokenUrl;
break;
Expand Down

0 comments on commit 150f4cb

Please sign in to comment.