Directus icon

Directus

Consume Directus API

Overview

This node integrates with the Directus API to perform various operations on different resources. Specifically, for the Authentication resource with the List operation, it retrieves a list of OAuth authentication providers configured in Directus.

This is useful when you want to programmatically obtain available OAuth providers for authentication flows, such as displaying login options or managing OAuth configurations dynamically.

Example use cases:

  • Fetching all OAuth providers to display them in a custom login UI.
  • Automating workflows that depend on the available authentication methods.
  • Integrating Directus authentication options into other systems.

Properties

Name Meaning
Split Into Items Boolean option to output each element of the returned array as its own separate item. If false, the entire array is output as a single item.

Output

The node outputs JSON data representing the list of OAuth providers retrieved from the Directus API endpoint auth/oauth.

  • If Split Into Items is set to true and the response is an array, each provider object is output as a separate item.
  • Otherwise, the entire list is output as a single JSON object.

The structure of each provider object depends on the Directus API but typically includes details like provider name, client ID, scopes, and other OAuth configuration metadata.

No binary data output is involved in this operation.

Dependencies

  • Requires a valid connection to a Directus instance via an API key credential (configured in n8n credentials).
  • The node uses the Directus REST API endpoints under the auth/oauth path.
  • No additional external dependencies are required beyond the Directus API access.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Network connectivity problems to the Directus server.
    • Insufficient permissions on the API key to access the auth/oauth endpoint.
    • Unexpected API responses if the Directus version does not support the queried endpoint.
  • Error messages:

    • Errors from the Directus API will be propagated, often including HTTP status codes and error messages.
    • If the node is set to continue on fail, errors will appear in the output JSON under an error property.
  • Resolutions:

    • Verify API credentials and permissions.
    • Ensure the Directus instance is reachable and running.
    • Confirm the Directus version supports OAuth provider listing.
    • Check network/firewall settings.

Links and References


This summary focuses exclusively on the Authentication > List operation as requested.

Discussion