Reset User 2FA

This API, as marked in the sidebar is only for admin panel use. An only admin users will be authorized to use it. It will reset he user's 2FA data, making it seem like the user never registered for the 2FA. The user will have to register for 2FA again after this.

Endpoint

PUT /2fa/reset-user-2fa

Payload

In the payload, firstly the admin's session-token cookie header should be sent and secondly the following body:

1 2 3 { "user_id": "65ddb7496a09ca290bec88b2" // The user ID of the respected user who's 2FA you want to reset. }

Response

1 2 3 4 5 { "success": true, "msg": "john's 2FA has been reset.", "user": {} // Same updated user object as mentioned in earlier APIs }