mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Ensure the generic OAuth2 API credential uses the OAuth2 credential test (#8941)
This commit is contained in:
@@ -84,7 +84,7 @@ export class CredentialsTester {
|
||||
return 'access_token' in oauthTokenData;
|
||||
}
|
||||
|
||||
private getCredentialTestFunction(
|
||||
getCredentialTestFunction(
|
||||
credentialType: string,
|
||||
): ICredentialTestFunction | ICredentialTestRequestData | undefined {
|
||||
// Check if test is defined on credentials
|
||||
@@ -116,7 +116,8 @@ export class CredentialsTester {
|
||||
for (const { name, testedBy } of nodeType.description.credentials ?? []) {
|
||||
if (
|
||||
name === credentialType &&
|
||||
this.credentialTypes.getParentTypes(name).includes('oAuth2Api')
|
||||
(this.credentialTypes.getParentTypes(name).includes('oAuth2Api') ||
|
||||
name === 'oAuth2Api')
|
||||
) {
|
||||
return async function oauth2CredTest(
|
||||
this: ICredentialTestFunctions,
|
||||
|
||||
Reference in New Issue
Block a user