refactor: Change Google nodes to use OAuth2 as default (#3713)

* upstream merge

*  oAuth2 by default for Google nodes

*  lockfile fix
This commit is contained in:
Michael Kret
2022-07-18 11:15:03 +03:00
committed by GitHub
parent 68fb1c64dc
commit f958e6ffab
9 changed files with 197 additions and 17 deletions

View File

@@ -27,7 +27,7 @@ export class GoogleTranslate implements INodeType {
// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg
icon: 'file:googletranslate.png',
group: ['input', 'output'],
version: 1,
version: [1, 2],
description: 'Translate data using Google Translate',
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
defaults: {
@@ -75,6 +75,36 @@ export class GoogleTranslate implements INodeType {
},
],
default: 'serviceAccount',
displayOptions: {
show: {
'@version': [
1,
],
}
},
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
name: 'OAuth2 (Recommended)',
value: 'oAuth2',
},
{
name: 'Service Account',
value: 'serviceAccount',
},
],
default: 'oAuth2',
displayOptions: {
show: {
'@version': [
2,
],
}
},
},
{
displayName: 'Resource',