Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

User → Enable 2FA

AI-generated

Overview

This node operation enables Two-Factor Authentication (2FA) for a user by verifying a One-Time Password (OTP) generated with a secret key. It is useful in scenarios where enhanced security is required for user accounts, such as in administrative portals or applications handling sensitive data. For example, an admin can enable 2FA for a user by providing the OTP and the secret key to ensure the user has correctly set up 2FA.

Use Case Examples

  1. Enabling 2FA for a user in a user management system to enhance account security.
  2. Verifying a user's OTP during 2FA setup to confirm the correct configuration.

Properties

Name Meaning
OTP The One-Time Password generated with the secret to verify the user's 2FA setup is correct.
Secret The TFA secret key used to generate the OTP, obtained from a prior TFA generation step.

Output

JSON

  • success - Indicates whether the 2FA enabling operation was successful.
  • message - Additional information or confirmation message about the 2FA enabling process.

Dependencies

  • Requires an API key credential or authentication token to interact with the user management system's API for enabling 2FA.

Troubleshooting

  • Common issues include providing an incorrect OTP or secret, which will cause the 2FA enabling to fail. Verify that the OTP is generated from the correct secret and is current.
  • Error messages may indicate invalid OTP or secret, or authentication failure with the API. Ensure credentials are correct and the OTP matches the secret.

Discussion