Directus (DrWade) icon

Directus (DrWade)

Consume Directus API

Authentication → List

AI-generated

Overview

The Directus (DrWade) n8n node for the resource Authentication with the operation List retrieves a list of available OAuth authentication providers from a Directus instance. This is useful when you want to dynamically fetch and display all configured OAuth providers, for example, to allow users to select a provider for login or integration purposes.

Common scenarios:

  • Displaying available OAuth providers in a user interface.
  • Automating workflows that depend on the presence or configuration of certain authentication methods.
  • Auditing or synchronizing authentication options between systems.

Practical example:
You might use this node in an onboarding workflow to show users which third-party login options are available (e.g., Google, Facebook, GitHub) by fetching them directly from your Directus backend.


Properties

Name Type Meaning
Split Into Items Boolean If enabled, each OAuth provider will be output as a separate item; otherwise, all providers are returned in a single array.

Output

  • If Split Into Items is false (default):
    The node outputs a single item with a json field containing an array of OAuth provider objects.

  • If Split Into Items is true:
    The node outputs one item per OAuth provider, each with its own json field containing the provider's details.

Example output structure:

// When "Split Into Items" is false:
{
  "json": [
    {
      "name": "google",
      "displayName": "Google",
      // ...other provider fields
    },
    {
      "name": "github",
      "displayName": "GitHub"
      // ...other provider fields
    }
    // ...
  ]
}

// When "Split Into Items" is true:
[
  { "json": { "name": "google", "displayName": "Google" /* ... */ } },
  { "json": { "name": "github", "displayName": "GitHub" /* ... */ } }
  // ...
]

Note: The actual fields inside each provider object depend on your Directus configuration.


Dependencies

  • Directus API: You must have access to a running Directus instance with OAuth providers configured.
  • API Credentials: The node requires valid Directus API credentials (directusApi) set up in n8n.

Troubleshooting

Common issues:

  • Invalid credentials: If the API key or credentials are incorrect, the node will fail to connect to Directus.
  • No OAuth providers configured: If there are no OAuth providers set up in Directus, the output will be an empty array.
  • Network errors: Connectivity issues between n8n and Directus can cause failures.

Error messages and resolutions:

  • "401 Unauthorized": Check your Directus API credentials in n8n.
  • "404 Not Found": Ensure the Directus instance URL is correct and the /auth/oauth endpoint is available.
  • "Cannot read property 'data' of undefined": This may indicate an unexpected response from Directus; check your Directus server logs and configuration.

Links and References

Discussion