mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-22 07:53:34 +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);
|
let requestCopy = cloneDeep(request);
|
||||||
const { authorizationCode } = await getOAuth2AuthorizationCode(requestCopy, codeChallenge, collectionUid);
|
const { authorizationCode } = await getOAuth2AuthorizationCode(requestCopy, codeChallenge, collectionUid);
|
||||||
const oAuth = get(requestCopy, 'oauth2', {});
|
const oAuth = get(requestCopy, 'oauth2', {});
|
||||||
const { clientId, clientSecret, callbackUrl, scope, state, pkce } = oAuth;
|
const { clientId, clientSecret, callbackUrl, scope, pkce } = oAuth;
|
||||||
const data = {
|
const data = {
|
||||||
grant_type: 'authorization_code',
|
grant_type: 'authorization_code',
|
||||||
code: authorizationCode,
|
code: authorizationCode,
|
||||||
redirect_uri: callbackUrl,
|
redirect_uri: callbackUrl,
|
||||||
client_id: clientId,
|
client_id: clientId,
|
||||||
client_secret: clientSecret,
|
client_secret: clientSecret
|
||||||
state: state
|
|
||||||
};
|
};
|
||||||
if (pkce) {
|
if (pkce) {
|
||||||
data['code_verifier'] = codeVerifier;
|
data['code_verifier'] = codeVerifier;
|
||||||
|
Loading…
Reference in New Issue
Block a user