Auth API reference

Auth API · End-Users

post/v1/apps/{app_id}/end-users/{user_id}/mfa/require-reenrollmentAuth

Force an end-user back through MFA enrolment

Disables every enabled factor on the account, destroys its recovery codes, and revokes every live session. The next sign-in on an app running `auth_config.mfa: "required"` returns `mfa_enrollment_required` and the user must enrol a new factor before a session is minted. On an app running `mfa: "optional"` the user simply ends up with no MFA, which is the pre-existing meaning of deleting their factors. All three steps matter: leaving the recovery codes alive would let whoever holds the old printout complete `/auth/mfa/recover` and skip enrolment entirely. Audited, and emits `user.mfa.factor_disabled` per factor plus one `user.mfa.reenrollment_required`. Idempotent.

Path parameters

app_id*string

Id of the app.

user_id*string

Id of the user.

Response · 200 Factors disabled, recovery codes destroyed, sessions revoked.

factors_disabled*number

How many enabled factors were disabled. Zero when the account already held none — the call still destroys recovery codes and revokes sessions.

Example: 1

Example

Request

POST https://api.auth.productcraft.co/v1/apps/{app_id}/end-users/{user_id}/mfa/require-reenrollment
Authorization: Bearer YOUR_TOKEN

Response

{
  "factors_disabled": 1
}