Actions109
- Activity Actions
- Assets Actions
- Authentication Actions
- Collections 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
This node interacts with the Directus API to manage users, including disabling two-factor authentication (2FA) for the current user. Specifically, the "Disable 2FA" operation allows a user to disable their two-factor authentication by providing a one-time password (OTP) generated by their authenticator app. This is useful in scenarios where a user wants to turn off 2FA for their account, for example, if they lose access to their authenticator app or want to switch to another authentication method.
Practical example:
- A user has enabled 2FA on their Directus account but decides to disable it temporarily. They use this node operation, supplying the current OTP from their authenticator app, to disable 2FA securely.
Properties
| Name | Meaning |
|---|---|
| OTP | One-time password generated by the authenticator app. Required to authenticate the request to disable 2FA. |
Output
The output JSON contains the response from the Directus API after attempting to disable 2FA. It typically includes confirmation of the action or error details if the operation failed.
No binary data output is involved in this operation.
Example output JSON structure:
{
"json": {
// Response data from Directus API about the 2FA disable action
}
}
Dependencies
- Requires an active connection to a Directus instance via its API.
- Requires an API key credential configured in n8n to authenticate requests to the Directus API.
- The node uses the Directus REST API endpoint
users/me/tfa/disablewith a POST request.
Troubleshooting
- Invalid OTP: If the provided OTP is incorrect or expired, the API will reject the request. Ensure the OTP is freshly generated from the authenticator app.
- Authentication errors: If the API key credential is missing or invalid, the request will fail. Verify that the Directus API credentials are correctly set up in n8n.
- Network issues: Connectivity problems to the Directus server will cause failures. Check network access and Directus server availability.
- API changes: If the Directus API version changes, endpoints or required parameters might differ. Confirm compatibility with your Directus version.
Common error messages may include:
"Invalid OTP"or"Two-factor authentication code is incorrect.""Unauthorized"indicating credential issues."Network Error"or timeouts.
Resolving these usually involves verifying the OTP, checking credentials, and ensuring network connectivity.