Actions100
- Activity Actions
- Asset Actions
- Authentication Actions
- Collection Actions
- Extension Actions
- Field Actions
- File Actions
- Folder Actions
- Item Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Setting Actions
- User Actions
- Utility Actions
Overview
The node's execute()
method initiates the OAuth authentication flow for a specified provider. This is useful when integrating third-party services that require OAuth-based login, allowing users to authenticate and authorize access securely. A common scenario includes starting the OAuth process for services like Google, GitHub, or other OAuth providers within an automation workflow.
For example, you might use this node to start the OAuth flow for a cloud storage service, enabling subsequent nodes to access files on behalf of the authenticated user.
Properties
Name | Meaning |
---|---|
Provider | The key identifying which OAuth provider to use for authentication (e.g., Google, GitHub). |
Additional Fields | Optional extra parameters; currently supports: |
- Redirect | URL to redirect the user after successful login. If set, authentication details are stored in cookies; otherwise, a JSON response is returned. |
Output
The output contains JSON data related to the OAuth flow initiation. If the Redirect
field is set, the node manages authentication details via cookies and redirects the user accordingly. Otherwise, it returns a JSON object with authentication information necessary to continue the OAuth process.
No binary data output is involved.
Dependencies
- Requires configuration of OAuth providers with their respective client IDs, secrets, and endpoints.
- Needs an API key credential or similar authentication setup to manage OAuth securely.
- May depend on environment variables or n8n credentials to store OAuth provider details.
Troubleshooting
Common issues:
- Incorrect or missing provider key can cause failure to initiate the OAuth flow.
- Misconfigured redirect URLs may lead to failed redirection or authentication errors.
- Missing or invalid OAuth credentials will prevent successful authentication.
Error messages:
- Errors indicating "Invalid provider" suggest the provider key does not match any configured OAuth provider.
- Redirect URI mismatch errors indicate the redirect URL does not match what is registered with the OAuth provider.
Resolutions:
- Verify the provider key matches exactly with the configured OAuth provider.
- Ensure the redirect URL is correctly registered in the OAuth provider settings.
- Confirm all required OAuth credentials are properly set up in n8n.