Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide scopes for custom node operations #3164

Merged
merged 9 commits into from
Apr 28, 2022

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Apr 20, 2022

  OAuth2 scopes
    ✓ GET /oauth2-credential/scopes should return scopes - comma-delimited (56 ms)
    ✓ GET /oauth2-credential/scopes should return scopes - whitespace-delimited (29 ms)
    ✓ GET /oauth2-credential/scopes should return scope - non-delimited (31 ms)
    ✓ GET /oauth2-credential/scopes should fail with missing credential type (25 ms)
    ✓ GET /oauth2-credential/scopes should fail with non-OAuth2 credential type (11 ms)
    ✓ GET /oauth2-credential/scopes should fail with wrong credential type (24 ms)

@ivov ivov added feature Large self-contained feature n8n team Authored by the n8n team labels Apr 20, 2022
@@ -1932,6 +1933,8 @@ class App {
// OAuth2-Credential/Auth
// ----------------------------------------

this.app.use(`/${this.restEndpoint}/oauth2-credential`, oauth2CredentialController);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In future we can move /oauth2-credential/auth and /oauth2-credential/callback to the new controller.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should 😊 can you create a Tech Debt ticket for it?

@@ -58,6 +58,7 @@ class LoadNodesAndCredentialsClass {
// In case "n8n" package is the root and the packages are
// in the "node_modules" folder underneath it.
path.join(__dirname, '..', '..', 'node_modules', 'n8n-workflow'),
path.join(__dirname, '..', 'node_modules', 'n8n-workflow'), // for test run
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not ideal, but larger refactoring would seem out of scope.

@BHesseldieck BHesseldieck self-requested a review April 20, 2022 16:08
@@ -1932,6 +1933,8 @@ class App {
// OAuth2-Credential/Auth
// ----------------------------------------

this.app.use(`/${this.restEndpoint}/oauth2-credential`, oauth2CredentialController);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should 😊 can you create a Tech Debt ticket for it?

@alexgrozav alexgrozav merged commit f8e992c into custom-operations Apr 28, 2022
@alexgrozav alexgrozav deleted the n8n-3369-provide-scopes branch April 28, 2022 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Large self-contained feature n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants