Skip to Content
HomeLink Hub
Users & Profile

Turn on the two-factor authentication flag

POST
/api/v1/user/enable-2fa

Access: Bearer token required.

Sets twoFactorEnabled to true on the account. No request body is read. This is only a stored preference today: no secret or code is generated or verified, and none of the sign-in endpoints check the flag, so signing in is unchanged. Idempotent.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Response Body

Flag set

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X POST 'http://localhost:4000/api/v1/user/enable-2fa'
Example Response
{  "status": 200,  "success": true,  "message": "Two-factor authentication enabled.",  "data": {    "twoFactorEnabled": true  }}