B2B Saas Authentication

/

Frontend SDKs

/

Headless

/

Members

/

Delete Member MFA TOTP

Delete Member TOTP

The Delete Member TOTP method wraps the Delete Member TOTP API endpoint. The organization_id will be automatically inferred from the logged-in Member's session. This method cannot be used to delete totps of Members in other Organizations.

To change a Member's TOTP, you must first call this endpoint to delete the existing TOTP.

Existing Member Sessions that include a TOTP authentication factor will not be revoked if the TOTP is deleted, and MFA will not be enforced until the Member logs in again. If you wish to enforce MFA immediately after a TOTP is deleted, you can do so by prompting the Member to create a TOTP and calling the Create TOTP endpoint, then calling the TOTP Authenticate endpoint.

Use the Delete Self MFA TOTP method when when the Member is deleting their own TOTP MFA.


Method parameters


member_id*string
import { useStytchB2BClient } from '@stytch/react/b2b';

export const DeleteMFATOTP = () => {
  const stytch = useStytchB2BClient();

  const deleteMemberTOTP = () => {
    stytch.organization.members.deleteMFATOTP('member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f');
  };

  return <button onClick={deleteMemberTOTP}>Delete TOTP</button>;
};

RESPONSE

200
{
    "member": {...},
    "member_id": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f",
    "organization": {...}
    "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
    "status_code": 200
}