B2B Saas Authentication

/

Mobile SDKs

/

React Native SDK reference

/

Members

/

Delete Member MFA Phone Number (Deprecated)

Delete Member MFA phone number (Deprecated)

This method is deprecated. Please use the Delete Self MFA Phone Number method to update the logged-in Member's MFA phone number, or use the new Delete MFA Phone Number method to update other Members' MFA phone numbers.

The Delete Member MFA phone number method wraps the Delete Member MFA phone number API endpoint. Use this method to delete the Member's MFA phone number.

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

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

You can listen for successful Member updates anywhere in the codebase with the stytch.organization.onMemberChange() method or useStytchMember hook.

import React from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import { useStytchB2BClient } from '@stytch/react/b2b';

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

  const deleteMFAPhoneNumber = () => {
    stytch.member.deleteMFAPhoneNumber();
  };

  return (
    <View>
      <TouchableOpacity onPress={deleteMFAPhoneNumber}>
        <Text>Delete MFA phone number</Text>
      </TouchableOpacity>
    </View>
  );
};

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
}