B2B Saas Authentication

/

Mobile SDKs

/

React Native SDK reference

/

Members

/

Delete Self Password

Delete Self password

The Delete Self password method wraps the Delete Member password API endpoint. The organization_id and member_id will be automatically inferred from the logged-in Member's session. This method can only be used to delete the logged-in Member's password.

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

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

  const deletePassword = () => {
    stytch.self.deletePassword('member-password-test-51861cbc-d3b9-428b-9761-227f5fb12be9');
  };

  return (
    <View>
      <TouchableOpacity onPress={deletePassword}>
        <Text>Delete Password</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
}