From 5d7f44fc6103cadc6c2fb80b0bc679380efc29a5 Mon Sep 17 00:00:00 2001 From: Oleg Vaskevich Date: Fri, 6 Sep 2024 02:48:31 -0700 Subject: [PATCH] Don't include state in OAuth 2 exchange flow (#3034) * Don't include state in OAuth 2 exchange flow if not specified * Remove state entirely --- packages/bruno-electron/src/ipc/network/oauth2-helper.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/bruno-electron/src/ipc/network/oauth2-helper.js b/packages/bruno-electron/src/ipc/network/oauth2-helper.js index 7a1a5b503..144542418 100644 --- a/packages/bruno-electron/src/ipc/network/oauth2-helper.js +++ b/packages/bruno-electron/src/ipc/network/oauth2-helper.js @@ -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;