Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

User → Generate 2FA

AI-generated

Overview

This node operation generates a Two-Factor Authentication (2FA) setup for a user in the system. It is useful for enhancing account security by enabling 2FA, which requires users to provide a second form of verification in addition to their password. A practical example is when an administrator or the user themselves wants to enable 2FA to protect their account from unauthorized access.

Use Case Examples

  1. An administrator generates a 2FA setup for a user to improve security.
  2. A user enables 2FA on their account to add an extra layer of protection.

Properties

Name Meaning
Password The user's password of the currently authenticated user, required to authorize the generation of 2FA.

Output

JSON

  • 2faSecret - The secret key generated for the user's 2FA setup, which can be used to configure an authenticator app.
  • qrCodeUrl - A URL to a QR code representing the 2FA secret, which can be scanned by an authenticator app to set up 2FA.

Dependencies

  • Requires authentication credentials to access the user account and generate 2FA.

Troubleshooting

  • Ensure the password provided is correct; an incorrect password will prevent 2FA generation.
  • Verify that the user has the necessary permissions to generate 2FA.
  • Check network connectivity if the node fails to communicate with the authentication service.

Discussion