agobrech
fc7261aca6
feat(core): Add PKCE for OAuth2 ( #6324 )
...
* Remove authorization header when empty
* Import pkce
* Add OAuth2 with new grant type to Twitter
* Add pkce logic auto assign authorization code if pkce not defined
* Add pkce to ui and interfaces
* Fix scopes for Oauth2 twitter
* Deubg + pass it through header
* Add debug console, add airtable cred
* Remove all console.logs, make PKCE in th body only when it exists
* Remove invalid character ~
* Remove more console.logs
* remove body inside query
* Remove useless grantype check
* Hide oauth2 twitter waiting for overhaul
* Remove redundant header removal
* Remove more console.logs
* Add comment for code verifier
* Remove uneeded scopes
* Restore client id in callback
* Revert "Add OAuth2 with new grant type to Twitter"
This reverts commit 1c3b331aa1
.
* Remove oauth2 from twitter
* Remove properties linked to oauth2
* Fix lodash imports
* remove redundant check
* remove redundant codeVerifier
* patch pkce-challenge to avoid generating `code_verifier` with `~`
* store `codeVerifier` on the DB like `csrfSecret`
* remove unrelated changes
---------
Co-authored-by: Marcus <marcus@n8n.io>
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2023-06-21 10:54:32 +02:00
Iván Ovejero
b03e358a12
refactor: Integrate consistent-type-imports
in nodes-base (no-changelog) ( #5267 )
...
* 👕 Enable `consistent-type-imports` for nodes-base
* 👕 Apply to nodes-base
* ⏪ Undo unrelated changes
* 🚚 Move to `.eslintrc.js` in nodes-base
* ⏪ Revert "Enable `consistent-type-imports` for nodes-base"
This reverts commit 529ad72b05
.
* 👕 Fix severity
2023-01-27 12:22:44 +01:00
Michael Kret
61e26804ba
refactor(core): Remove linting exceptions in nodes-base ( #4794 )
...
* ⚡ enabled array-type
* ⚡ await-thenable on
* ⚡ ban-types on
* ⚡ default-param-last on
* ⚡ dot-notation on
* ⚡ member-delimiter-style on
* ⚡ no-duplicate-imports on
* ⚡ no-empty-interface on
* ⚡ no-floating-promises on
* ⚡ no-for-in-array on
* ⚡ no-invalid-void-type on
* ⚡ no-loop-func on
* ⚡ no-shadow on
* ⚡ ban-ts-comment re enabled
* ⚡ @typescript-eslint/lines-between-class-members on
* address my own comment
* @typescript-eslint/return-await on
* @typescript-eslint/promise-function-async on
* @typescript-eslint/no-unnecessary-boolean-literal-compare on
* @typescript-eslint/no-unnecessary-type-assertion on
* prefer-const on
* @typescript-eslint/prefer-optional-chain on
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2022-12-02 21:54:28 +01:00
Ricardo Espinoza
7fcd821cad
feat(core): enable sending client credentials in body ( #4377 )
...
* ⚡ Enable inject credentials in the body for OAuth2 CC
* 🐛 Persist token data
* 👕 Fix linting error
2022-10-20 11:15:28 -04:00
Iván Ovejero
57afd480ab
refactor: Format all credentials ( #3720 )
...
* Apply Prettier to all credentials
* Fix quotes for lint
* 👕 Remove `quotemark` rule
* 👕 Run Prettier to take over quotes
* ⬆️ Upgrade `eslint-plugin-n8n-nodes-base`
* 📦 Update `package-lock.json`
Co-authored-by: Omar Ajoue <krynble@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-07-24 17:36:17 +02:00
Ricardo Espinoza
e29c5975e1
feat(core): Add "Client Credentials" grant type to OAuth2 ( #3489 )
...
* ⚡ Add OAuth2 client credentials grant type
* ⚡ Improvements
* 🐛 Fix linting issue
* 🐛 Fix typo
* 🐛 Fix small issue with type
* 🐛 When token expire get a new one instead of refreshing it
* ⚡ Fix issue that it did not display it correctly for OAuth1
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-06-13 22:27:19 -07:00
Iván Ovejero
336fc9e2a8
feat(core): Allow credential reuse on HTTP Request node ( #3228 )
...
* ✨ Create controller
* ⚡ Mount controller
* ✏️ Add error messages
* ✨ Create scopes fetcher
* ⚡ Account for non-existent credential type
* 📘 Type scopes request
* ⚡ Adjust error message
* 🧪 Add tests
* ✨ Introduce simple node versioning
* ⚡ Add example how to read version in node-code for custom logic
* 🐛 Fix setting of parameters
* 🐛 Fix another instance where it sets the wrong parameter
* ⚡ Remove unnecessary TOODs
* ✨ Re-version HTTP Request node
* 👕 Satisfy linter
* ⚡ Retrieve node version
* ⏪ Undo Jan's changes to Set node
* 🧪 Fix CI/CD for `/oauth2-credential` tests (#3230 )
* 🐛 Fix notice warning missing background color (#3231 )
* 🐛 Check for generic auth in node cred types
* ⚡ Refactor credentials dropdown for HTTP Request node (#3222 )
* ⚡ Discoverability flow (#3229 )
* ✨ Added node credentials type proxy. Changed node credentials input order.
* ⚡ Add computed property from versioning branch
* 🐛 Fix cred ref lost and unsaved
* ⚡ Make options consistent with cred type names
* ⚡ Use prop to set component order
* ⚡ Use constant and version
* ⚡ Fix rendering for generic auth creds
* ⚡ Mark as required on first selection
* ⚡ Implement discoverability flow
* ⚡ Mark as required on subsequent selections
* ⚡ Fix marking as required after cred deletion
* ⚡ Refactor to clean up
* ⚡ Detect position automatically
* ⚡ Add i18n to option label
* ⚡ Hide subtitle for custom action
* ⚡ Detect active credential type
* ⚡ Prop drilling to re-render select
* 🔥 Remove unneeded property
* ✏️ Rename arg
* 🔥 Remove unused import
* 🔥 Remove unneeded getters
* 🔥 Remove unused import
* ⚡ Generalize cred component positioning
* ⚡ Set up request
* 🐛 Fix edge case in endpoint
* ⚡ Display scopes alert box
* ⏪ Revert "Generalize cred comp positioning"
This reverts commit 75eea89273
.
* ⚡ Consolidate HTTPRN check
* ⚡ Fix hue percentage to degree
* 🔥 Remove unused import
* 🔥 Remove unused import
* 🔥 Remove unused class
* 🔥 Remove unused import
* 📘 Create type for HTTPRN v2 auth params
* ✏️ Rename check
* 🔥 Remove unused import
* ✏️ Add i18n to `reportUnsetCredential()`
* ⚡ Refactor Alex's spacing changes
* ⚡ Post-merge fixes
* ⚡ Add docs link
* 🔥 Exclude Notion OAuth cred
* ✏️ Update copy
* ✏️ Rename param
* 🎨 Reposition notice and simplify styling
* ✏️ Update copy
* ✏️ Update copy
* ⚡ Hide params during custom action
* ⚡ Show notice if any cred type supported
* 🐛 Prevent scopes text overflow
* 🔥 Remove superfluous check
* ✏️ Break up docstring
* 🎨 Tweak notice styling
* ⚡ Reorder cred param in Webhook node
* ✏️ Shorten cred name in scopes notice
* 🧪 Update Notice snapshots
* 🐛 Fix check when `globalRole` is `undefined`
* ⏪ Revert 3f2c4a6
* ⚡ Apply feedback from Product
* 🧪 Update snapshot
* ⚡ Adjust regex expansion pattern for singular
* 🔥 Remove unused import
* 🔥 Remove logging
* ⚡ Make `somethingElse` key more unique
* ⚡ Move something else to constants
* ⚡ Consolidate notice component
* ⚡ Apply latest feedback
* 🧪 Update tests
* 🧪 Update snapshot
* ✏️ Fix singular version
* 🧪 Finalize tests
* ✏️ Rename constant
* 🧪 Expand tests
* 🔥 Remove `truncate` prop
* 🚚 Move scopes fetching to store
* 🚚 Move method to component
* ⚡ Use constant
* ⚡ Refactor `Notice` component
* 🧪 Update tests
* 🔥 Remove unused keys
* ⚡ Inject custom API call option
* 🔥 Remove unused props
* 🎨 Use `compact` prop
* 🧪 Update snapshots
* 🚚 Move scopes to store
* 🚚 Move `nodeCredentialTypes` to parent
* ✏️ Rename cred types per branding
* 🐛 Clear scopes when none
* ⚡ Add default
* 🚚 Move `newHttpRequestNodeCredentialType` to parent
* 🔥 Remove test data
* ⚡ Separate lines for readability
* ⚡ Change reference from node to node name
* ✏️ Rename i18n keys
* ⚡ Refactor OAuth check
* 🔥 Remove unused key
* 🚚 Move `OAuth1/2 API` to i18n
* ⚡ Refactor `skipCheck`
* ⚡ Add `stopPropagation` and `preventDefault`
* 🚚 Move active credential scopes logic to store
* 🎨 Fix spacing for `NodeWebhooks` component
* ⚡ Implement feedback
* ⚡ Update HTTPRN default and issue copy
* Refactor to use `CredentialsSelect` param (#3304 )
* ⚡ Refactor into cred type param
* ⚡ Componentize scopes notice
* 🔥 Remove unused data
* 🔥 Remove unused `loadOptions`
* ⚡ Componentize `NodeCredentialType`
* 🐛 Fix param validation
* 🔥 Remove dup methods
* ⚡ Refactor all references to `isHttpRequestNodeV2`
* 🎨 Fix styling
* 🔥 Remove unused import
* 🔥 Remove unused properties
* 🎨 Fix spacing for Pipedrive Trigger node
* 🎨 Undo Webhook node styling change
* 🔥 Remove unused style
* ⚡ Cover `httpHeaderAuth` edge case
* 🐛 Fix `this.node` reference
* 🚚 Rename to `credentialsSelect`
* 🐛 Fix mistaken renaming
* ⚡ Set one attribute per line
* ⚡ Move condition to instantiation site
* 🚚 Rename prop
* ⚡ Refactor away `prepareScopesNotice`
* ✏️ Rename i18n keys
* ✏️ Update i18n calls
* ✏️ Add more i18n keys
* 🔥 Remove unused props
* ✏️ Add explanatory comment
* ⚡ Adjust check in `hasProxyAuth`
* ⚡ Refactor `credentialSelected` from prop to event
* ⚡ Eventify `valueChanged`, `setFocus`, `onBlur`
* ⚡ Eventify `optionSelected`
* ⚡ Add `noDataExpression`
* 🔥 Remove logging
* 🔥 Remove URL from scopes
* ⚡ Disregard expressions for display
* 🎨 Use CSS modules
* 📘 Tigthen interface
* 🐛 Fix generic auth display
* 🐛 Fix generic auth validation
* 📘 Loosen type
* 🚚 Move event params to end
* ⚡ Generalize reference
* ⚡ Refactor generic auth as `credentialsSelect` param
* ⏪ Restore check for `httpHeaderAuth `
* 🚚 Rename `existing` to `predefined`
* Extend metrics for HTTP Request node (#3282 )
* ⚡ Extend metrics
* 🧪 Add tests
* ⚡ Update param names
Co-authored-by: Alex Grozav <alex@grozav.com>
* ⚡ Update check per new branch
* ⚡ Include generic auth check
* ⚡ Adjust telemetry (#3359 )
* ⚡ Filter credential types by label
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Alex Grozav <alex@grozav.com>
2022-05-24 11:36:19 +02:00
Iván Ovejero
ecd3bbfcd3
⚡ Fix credential formatting issues ( #3134 )
...
* 👕 Autofix creds lint issues
* 👕 Manually fix creds lint issues
* 👕 Fix indentation
* ✏️ Fix typo
* 👕 Fix indentation
* ✏️ Fix typo
2022-04-14 08:32:27 +02:00
Iván Ovejero
5481dc3d25
⚡ Simplify property types in credentials ( #1869 )
2021-06-12 18:39:55 +02:00
Tanay Pant
815e663717
🔨 Add documentationUrl to credentials
2020-08-17 14:42:09 +02:00
Jan Oberhauser
6a08fc9da3
⚡ Small improvements to ZohoCRM-Node and OAuth fix
2020-02-14 18:48:58 -08:00
Jan Oberhauser
5594543ec8
⚡ Fix OAuth UI issues and allow to set additional query parameters
2020-02-08 16:14:28 -08:00
Jan Oberhauser
740cb8a6fc
⚡ Some small changes to basic OAuth support
2020-01-07 18:29:11 -06:00
Ram Yalamanchili
c44cfffdd9
Add OAuth2 credential type
2020-01-01 23:02:22 -08:00