Skip to main content
Docs

disableUserMFA()

Disable all of a user's MFA methods (e.g. OTP sent via SMS, TOTP on their authenticator app) at once. Returns a User object.

function disableUserMFA(userId: string): Promise<User>
  • Name
    userId
    Type
    string
    Description

    The ID of the user to disable MFA for.

Note

Importing clerkClient varies based on your framework. Refer to the Backend SDK overview for usage details, including guidance on how to access the userId and other properties.

const userId = 'user_123'

const response = await clerkClient.users.disableUserMFA(userId)

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint DELETE/users/{user_id}/mfa. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on