Directus icon

Directus

Consume Directus API

Overview

The Authentication - List operation in this n8n node interacts with the Directus API to retrieve a list of available OAuth authentication providers. This is useful for workflows that need to dynamically fetch and process the list of external authentication methods configured in a Directus instance.

Common scenarios:

  • Displaying available OAuth providers to users for login or registration flows.
  • Integrating with other systems that require knowledge of supported authentication mechanisms.
  • Automating administrative tasks related to authentication provider management.

Practical example:
A workflow could use this operation to fetch all OAuth providers, then iterate over them to display options in a custom UI or to synchronize provider configurations with another system.


Properties

Name Type Meaning
Split Into Items boolean Outputs each element of the returned array as its own item if enabled.

Output

  • The output is provided in the json field.
  • If Split Into Items is enabled and the response is an array, each OAuth provider will be output as a separate item ({ json: <provider> }).
  • If not, the entire array/object is output as a single item ({ json: <providersArrayOrObject> }).

Example output (with Split Into Items = true):

[
  { "json": { "id": "google", "name": "Google", ... } },
  { "json": { "id": "github", "name": "GitHub", ... } }
]

Example output (with Split Into Items = false):

[
  { "json": [ { "id": "google", "name": "Google", ... }, { "id": "github", "name": "GitHub", ... } ] }
]

Note: The actual structure of each provider object depends on the Directus API response.


Dependencies

  • Directus API: Requires access to a running Directus instance.
  • API Credentials: The node requires valid Directus API credentials (configured as directusApi in n8n).

Troubleshooting

  • Invalid Credentials: If the API credentials are incorrect or missing, the node will throw an authentication error. Ensure the correct credentials are set up in n8n.
  • Network Issues: If the Directus server is unreachable, you may see connection errors. Check network connectivity and server status.
  • Unexpected Output Structure: If the API response format changes, the output may not match expectations. Always verify the current Directus API documentation for any updates.
  • Error Handling: If an error occurs and "Continue On Fail" is enabled, the node outputs { "error": "<error message>" } in the json field.

Links and References

Discussion