mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 23:43:15 +01:00
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
This commit is contained in:
parent
c85d7b0c77
commit
5d7f44fc61
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user