mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(core): OAuth2 scope saved to DB fix
This commit is contained in:
parent
59771c80ea
commit
7cb5dc2aa5
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue