mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-07 08:34:15 +01:00
This commit is contained in:
parent
753ca4341f
commit
0f69c30a86
@ -49,8 +49,13 @@ const getOAuth2AuthorizationCode = (request, codeChallenge, collectionUid) => {
|
||||
const { callbackUrl, clientId, authorizationUrl, scope, pkce } = oauth2;
|
||||
|
||||
let oauth2QueryParams =
|
||||
(authorizationUrl.indexOf('?') > -1 ? '&' : '?') +
|
||||
`client_id=${clientId}&redirect_uri=${callbackUrl}&response_type=code&scope=${scope}`;
|
||||
(authorizationUrl.indexOf('?') > -1 ? '&' : '?') + `client_id=${clientId}&response_type=code`;
|
||||
if (callbackUrl) {
|
||||
oauth2QueryParams += `&redirect_uri=${callbackUrl}`;
|
||||
}
|
||||
if (scope) {
|
||||
oauth2QueryParams += `&scope=${scope}`;
|
||||
}
|
||||
if (pkce) {
|
||||
oauth2QueryParams += `&code_challenge=${codeChallenge}&code_challenge_method=S256`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user