Actions109
- Collections Actions
- Activity Actions
- Assets Actions
- Authentication Actions
- Extensions Actions
- Fields Actions
- Files Actions
- Folders Actions
- Items Actions
- Permissions Actions
- Presets Actions
- Relations Actions
- Revisions Actions
- Roles Actions
- Settings Actions
- Users Actions
- Utilities Actions
- Webhooks Actions
Overview
The Directus (DrWade) n8n node for the resource Users and operation Disable 2FA allows you to programmatically disable two-factor authentication (2FA) for the currently authenticated user in a Directus instance. This is achieved by providing a valid one-time password (OTP) generated by your authenticator app.
Common scenarios:
- Automating user account management workflows where 2FA needs to be disabled, such as during account recovery or administrative actions.
- Integrating with support/helpdesk systems to allow support agents to assist users in disabling 2FA after verifying their identity.
- Building custom user portals or admin panels that require toggling 2FA status via workflow automation.
Practical example:
A user loses access to their authenticator app. An administrator can trigger this node (with the user's OTP) to disable 2FA, allowing the user to regain access and reconfigure their 2FA settings.
Properties
| Name | Type | Meaning |
|---|---|---|
| OTP | String | One-time password generated by the authenticator app. Required for disabling 2FA. |
Output
- The output will be a JSON object containing the response from the Directus API after attempting to disable 2FA.
- The structure of the
jsonfield typically reflects the Directus API's response for the/users/me/tfa/disableendpoint. This may include confirmation of success or error details if the operation fails.
Example output:
{
"json": {
// Success or error information returned by Directus
}
}
Dependencies
- External Service: Requires access to a Directus instance with API enabled.
- Authentication: Needs valid Directus API credentials configured in n8n under the name
directusApi. - Environment: No special environment variables are required beyond standard n8n credential setup.
Troubleshooting
Common issues:
- Invalid OTP: If the provided OTP is incorrect or expired, the API will return an error indicating invalid authentication code.
- Missing Permissions: The user associated with the API credentials must have permission to manage their own 2FA settings.
- API Connectivity: Network or configuration issues between n8n and the Directus instance can cause failures.
Error messages and resolutions:
"Invalid OTP"or similar: Ensure the OTP is current and generated from the correct authenticator app."Unauthorized": Check that the API credentials are valid and have sufficient permissions."Request failed with status code 404": Verify the Directus instance URL and that the endpoint/users/me/tfa/disableis available.