mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -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,
|
||||
);
|
||||
|
||||
// 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(
|
||||
decryptedDataOriginal,
|
||||
(credential as unknown as ICredentialsEncrypted).type,
|
||||
|
|
Loading…
Reference in a new issue