mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Allow ignoring SSL issues on generic oauth2 credentials (#6702)
This commit is contained in:
committed by
GitHub
parent
db3c12ffc7
commit
feac369f6c
@@ -1092,6 +1092,7 @@ export async function requestOAuth2(
|
||||
clientSecret: credentials.clientSecret as string,
|
||||
accessTokenUri: credentials.accessTokenUrl as string,
|
||||
scopes: (credentials.scope as string).split(' '),
|
||||
ignoreSSLIssues: credentials.ignoreSSLIssues as boolean,
|
||||
});
|
||||
|
||||
let oauthTokenData = credentials.oauthTokenData as ClientOAuth2TokenData;
|
||||
@@ -1131,6 +1132,9 @@ export async function requestOAuth2(
|
||||
},
|
||||
oAuth2Options?.tokenType || oauthTokenData.tokenType,
|
||||
);
|
||||
|
||||
(requestOptions as OptionsWithUri).rejectUnauthorized = !credentials.ignoreSSLIssues;
|
||||
|
||||
// Signs the request by adding authorization headers or query parameters depending
|
||||
// on the token-type used.
|
||||
const newRequestOptions = token.sign(requestOptions as ClientOAuth2RequestObject);
|
||||
|
||||
Reference in New Issue
Block a user