mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix(core): Fix for Google and Microsoft generic OAuth2 credentials
This commit is contained in:
parent
ac066fc9f3
commit
efa4c56757
|
@ -93,10 +93,12 @@ oauth2CredentialController.get(
|
|||
|
||||
// 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
|
||||
// Generic Oauth2 API is an exception because it needs to save the scope
|
||||
const genericOAuth2 = ['oAuth2Api', 'googleOAuth2Api', 'microsoftOAuth2Api'];
|
||||
if (
|
||||
decryptedDataOriginal?.scope &&
|
||||
credentialType.includes('OAuth2') &&
|
||||
!['oAuth2Api'].includes(credentialType)
|
||||
!genericOAuth2.includes(credentialType)
|
||||
) {
|
||||
delete decryptedDataOriginal.scope;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue