mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-13 05:47:31 -08:00
⚡ Fix some minor issues with OAuth2
This commit is contained in:
parent
e51f4561d3
commit
a6add045bd
|
@ -8,12 +8,12 @@ const scopes = [
|
||||||
'https://www.googleapis.com/auth/calendar.events',
|
'https://www.googleapis.com/auth/calendar.events',
|
||||||
];
|
];
|
||||||
|
|
||||||
export class GoogleOAuth2Api implements ICredentialType {
|
export class GoogleCalendarOAuth2Api implements ICredentialType {
|
||||||
name = 'googleOAuth2Api';
|
name = 'googleCalendarOAuth2Api';
|
||||||
extends = [
|
extends = [
|
||||||
'oAuth2Api',
|
'googleOAuth2Api',
|
||||||
];
|
];
|
||||||
displayName = 'Google OAuth2 API';
|
displayName = 'Google Calendar OAuth2 API';
|
||||||
properties = [
|
properties = [
|
||||||
{
|
{
|
||||||
displayName: 'Scope',
|
displayName: 'Scope',
|
||||||
|
|
|
@ -14,7 +14,7 @@ export class GoogleSheetsOAuth2Api implements ICredentialType {
|
||||||
extends = [
|
extends = [
|
||||||
'googleOAuth2Api',
|
'googleOAuth2Api',
|
||||||
];
|
];
|
||||||
displayName = 'Google OAuth2 API';
|
displayName = 'Google Sheets OAuth2 API';
|
||||||
properties = [
|
properties = [
|
||||||
{
|
{
|
||||||
displayName: 'Scope',
|
displayName: 'Scope',
|
||||||
|
|
|
@ -50,7 +50,7 @@ export async function githubApiRequest(this: IHookFunctions | IExecuteFunctions,
|
||||||
|
|
||||||
const baseUrl = credentials!.server || 'https://api.github.com';
|
const baseUrl = credentials!.server || 'https://api.github.com';
|
||||||
options.uri = `${baseUrl}${endpoint}`;
|
options.uri = `${baseUrl}${endpoint}`;
|
||||||
//@ts-ignore
|
|
||||||
return await this.helpers.requestOAuth.call(this, 'githubOAuth2Api', options);
|
return await this.helpers.requestOAuth.call(this, 'githubOAuth2Api', options);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -47,7 +47,7 @@ export class Github implements INodeType {
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
authentication: [
|
authentication: [
|
||||||
'oauth2',
|
'oAuth2',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -65,7 +65,7 @@ export class Github implements INodeType {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'OAuth2',
|
name: 'OAuth2',
|
||||||
value: 'oauth2',
|
value: 'oAuth2',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: 'accessToken',
|
default: 'accessToken',
|
||||||
|
|
|
@ -53,7 +53,7 @@ export class GoogleSheets implements INodeType {
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
authentication: [
|
authentication: [
|
||||||
'oauth2',
|
'oAuth2',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -71,7 +71,7 @@ export class GoogleSheets implements INodeType {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'OAuth2',
|
name: 'OAuth2',
|
||||||
value: 'oauth2',
|
value: 'oAuth2',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: 'serviceAccount',
|
default: 'serviceAccount',
|
||||||
|
|
|
@ -110,7 +110,7 @@ export class Slack implements INodeType {
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
authentication: [
|
authentication: [
|
||||||
'oauth2',
|
'oAuth2',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -128,7 +128,7 @@ export class Slack implements INodeType {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'OAuth2',
|
name: 'OAuth2',
|
||||||
value: 'oauth2',
|
value: 'oAuth2',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
default: 'accessToken',
|
default: 'accessToken',
|
||||||
|
|
Loading…
Reference in a new issue