Skip to Content
You are viewing a beta version of Clerk Docs
Visit the latest docs
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

disableUserMFA()

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

function disableUserMFA: (userId: string) => Promise<User>;

disableUserMFA() parameters

NameTypeDescription
userIdstringThe ID of the user to disable MFA for.

disableUserMFA() example

const userId = 'user_2bxfCJOe0Ocd8DNe9hFN3EXvfOu'; const response = await clerkClient.users.disableUserMFA(userId); console.log(response); /* { user_id: 'user_2bxfCJOe0Ocd8DNe9hFN3EXvfOu' } */

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(opens in a new tab) for more details.

What did you think of this content?

Clerk © 2024