Skip to content

Commit

Permalink
Use URL Encoded Form for OAuth2.0 token endpoint (#1701)
Browse files Browse the repository at this point in the history
OAuth2.0 expects URL encoded form instead of JSON content
https://www.oauth.com/oauth2-servers/server-side-apps/example-flow/

Co-authored-by: Anoop M D <[email protected]>
  • Loading branch information
jackj-msft and helloanoop authored Mar 4, 2024
1 parent 858536e commit cc02794
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/bruno-electron/src/ipc/network/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ const configureRequest = async (
case 'authorization_code':
interpolateVars(requestCopy, envVars, collectionVariables, processEnvVars);
const { data: authorizationCodeData, url: authorizationCodeAccessTokenUrl } =
await resolveOAuth2AuthorizationCodeAccessToken(requestCopy);
await resolveOAuth2AuthorizationCodeAccessToken(requestCopy);
request.headers['content-type'] = 'application/x-www-form-urlencoded';
request.data = authorizationCodeData;
request.url = authorizationCodeAccessTokenUrl;
break;
Expand Down

0 comments on commit cc02794

Please sign in to comment.