Actions111
- Item Actions
- Webhook Actions
- Collection Actions
- File Actions
- Activity Actions
- Asset Actions
- Authentication Actions
- Extension Actions
- Field Actions
- Folder Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Setting Actions
- User Actions
- Utility Actions
Overview
This node initiates an OAuth authentication flow with a specified provider. It is designed to start the process of user authentication by redirecting users to the chosen OAuth provider's login page or returning authentication details in JSON format. This is useful in scenarios where you need to connect n8n workflows to external services that require OAuth-based authentication, such as Google, GitHub, or other third-party APIs.
Practical examples:
- Starting an OAuth login for a user to access their Google Drive files.
- Initiating authentication with a custom OAuth provider before making API requests on behalf of a user.
Properties
| Name | Type | Meaning |
|---|---|---|
| Provider | String | Key of the activated OAuth provider. Specifies which OAuth service (e.g., Google, GitHub) to use. |
| Additional Fields | Collection | Optional fields to further customize the authentication flow. |
| └ Redirect | String | URL to redirect to upon successful login. If set, authentication details are stored in cookies; otherwise, a JSON response is returned. |
Output
- If the Redirect field is set:
- The user is redirected to the specified URL after successful authentication, and authentication details are stored in cookies.
- If the Redirect field is not set:
- The node returns a JSON object containing authentication details (such as tokens or user info).
Dependencies
- Requires at least one OAuth provider to be configured and activated in n8n.
- May require environment variables or credentials specific to the OAuth provider (e.g., client ID, client secret).
- No additional external dependencies beyond standard n8n configuration.
Troubleshooting
- Missing Provider:
If the "Provider" field is empty or incorrect, the node may fail to initiate the OAuth flow. Ensure the provider key matches an activated OAuth provider in your n8n instance. - Invalid Redirect URL:
If the "Redirect" URL is invalid or not allowed by the OAuth provider, authentication may fail. Make sure the redirect URI is registered with the provider. - Authentication Failure:
Errors during the OAuth process (e.g., invalid credentials, denied permissions) will result in error messages from the provider. Check provider settings and permissions.