mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(core): On OAuth access token update only update partial credential (#17135)
Co-authored-by: r00gm <raul00gm@gmail.com>
This commit is contained in:
@@ -74,4 +74,10 @@ export class CredentialsHelper extends ICredentialsHelper {
|
||||
_type: string,
|
||||
_data: ICredentialDataDecryptedObject,
|
||||
): Promise<void> {}
|
||||
|
||||
async updateCredentialsOauthTokenData(
|
||||
_nodeCredentials: INodeCredentialsDetails,
|
||||
_type: string,
|
||||
_data: ICredentialDataDecryptedObject,
|
||||
): Promise<void> {}
|
||||
}
|
||||
|
||||
@@ -980,7 +980,7 @@ export async function requestOAuth2(
|
||||
credentials.oauthTokenData = data;
|
||||
|
||||
// Save the refreshed token
|
||||
await additionalData.credentialsHelper.updateCredentials(
|
||||
await additionalData.credentialsHelper.updateCredentialsOauthTokenData(
|
||||
nodeCredentials,
|
||||
credentialsType,
|
||||
credentials as unknown as ICredentialDataDecryptedObject,
|
||||
@@ -1061,7 +1061,7 @@ export async function requestOAuth2(
|
||||
});
|
||||
}
|
||||
const nodeCredentials = node.credentials[credentialsType];
|
||||
await additionalData.credentialsHelper.updateCredentials(
|
||||
await additionalData.credentialsHelper.updateCredentialsOauthTokenData(
|
||||
nodeCredentials,
|
||||
credentialsType,
|
||||
credentials as unknown as ICredentialDataDecryptedObject,
|
||||
@@ -1141,7 +1141,7 @@ export async function requestOAuth2(
|
||||
const nodeCredentials = node.credentials[credentialsType];
|
||||
|
||||
// Save the refreshed token
|
||||
await additionalData.credentialsHelper.updateCredentials(
|
||||
await additionalData.credentialsHelper.updateCredentialsOauthTokenData(
|
||||
nodeCredentials,
|
||||
credentialsType,
|
||||
credentials as unknown as ICredentialDataDecryptedObject,
|
||||
|
||||
Reference in New Issue
Block a user