feat(Shopify Node): Add OAuth support (#3389)

*  wip

*  Add includeAccessTokenInHeader option to OAuth2

* 🔨 fixed build error, fixed trigger node when using token auth

* 🔨 fixed trigger when using oauth2

* 🔨 changed default auth method to access token

*  Improvements

*  Improvements

*  Improvements

*  Rename includeAccessTokenInHeader to keyToIncludeInAccessTokenHeader

*  Assign values to only header property

* 🔥 Remove unreachable code

*  Add keyToIncludeInAccessTokenHeader when isN8nRequest

*  Add CC grant type when isN8nRequest

Co-authored-by: Ricardo Espinoza <ricardo@n8n.io>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com>
This commit is contained in:
Michael Kret
2022-07-15 11:36:01 +03:00
committed by GitHub
parent 74064325c8
commit 945e25a77c
9 changed files with 333 additions and 12 deletions

View File

@@ -57,9 +57,58 @@ export class Shopify implements INodeType {
{
name: 'shopifyApi',
required: true,
displayOptions: {
show: {
authentication: [
'apiKey',
],
},
},
},
{
name: 'shopifyAccessTokenApi',
required: true,
displayOptions: {
show: {
authentication: [
'accessToken',
],
},
},
},
{
name: 'shopifyOAuth2Api',
required: true,
displayOptions: {
show: {
authentication: [
'oAuth2',
],
},
},
},
],
properties: [
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
name: 'Access Token',
value: 'accessToken',
},
{
name: 'OAuth2',
value: 'oAuth2',
},
{
name: 'API Key',
value: 'apiKey',
},
],
default: 'apiKey',
},
{
displayName: 'Resource',
name: 'resource',