mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
fix(core): OAuth2 scope saved to DB fix
This commit is contained in:
@@ -89,6 +89,12 @@ oauth2CredentialController.get(
|
|||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// At some point in the past we saved hidden scopes to credentials (but shouldn't)
|
||||||
|
// Delete scope before applying defaults to make sure new scopes are present on reconnect
|
||||||
|
if (decryptedDataOriginal?.scope) {
|
||||||
|
delete decryptedDataOriginal.scope;
|
||||||
|
}
|
||||||
|
|
||||||
const oauthCredentials = credentialsHelper.applyDefaultsAndOverwrites(
|
const oauthCredentials = credentialsHelper.applyDefaultsAndOverwrites(
|
||||||
decryptedDataOriginal,
|
decryptedDataOriginal,
|
||||||
(credential as unknown as ICredentialsEncrypted).type,
|
(credential as unknown as ICredentialsEncrypted).type,
|
||||||
|
|||||||
Reference in New Issue
Block a user