mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(core): Fix OAuth credential creation via API (#5064)
* fix(core): Fix OAuth credential creation via API * Fix tests
This commit is contained in:
@@ -299,6 +299,21 @@ export class CredentialsHelper extends ICredentialsHelper {
|
||||
}
|
||||
|
||||
if (credentialTypeData.extends === undefined) {
|
||||
// Manually add the special OAuth parameter which stores
|
||||
// data like access- and refresh-token
|
||||
if (['oAuth1Api', 'oAuth2Api'].includes(type)) {
|
||||
return [
|
||||
...credentialTypeData.properties,
|
||||
{
|
||||
displayName: 'oauthTokenData',
|
||||
name: 'oauthTokenData',
|
||||
type: 'json',
|
||||
required: false,
|
||||
default: {},
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
return credentialTypeData.properties;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user