Skip to content

Commit

Permalink
Don't include state in OAuth 2 exchange flow (usebruno#3034)
Browse files Browse the repository at this point in the history
* Don't include state in OAuth 2 exchange flow if not specified
* Remove state entirely
  • Loading branch information
oleg-codaio authored and Its-treason committed Sep 7, 2024
1 parent d1a7eee commit 3e5ce1b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/bruno-electron/src/ipc/network/oauth2-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ const resolveOAuth2AuthorizationCodeAccessToken = async (request, collectionUid)
let requestCopy = cloneDeep(request);
const { authorizationCode } = await getOAuth2AuthorizationCode(requestCopy, codeChallenge, collectionUid);
const oAuth = get(requestCopy, 'oauth2', {});
const { clientId, clientSecret, callbackUrl, scope, state, pkce } = oAuth;
const { clientId, clientSecret, callbackUrl, scope, pkce } = oAuth;
const data = {
grant_type: 'authorization_code',
code: authorizationCode,
redirect_uri: callbackUrl,
client_id: clientId,
client_secret: clientSecret,
state: state
client_secret: clientSecret
};
if (pkce) {
data['code_verifier'] = codeVerifier;
Expand Down

0 comments on commit 3e5ce1b

Please sign in to comment.