B2B Saas Authentication

/

Frontend SDKs

/

Headless

/

Passwords

/

Reset by Email Start

Reset by email start


Method parameters


email_address*string

organization_id*string

reset_password_redirect_urlstring

login_redirect_urlstring

reset_password_expiration_minutesint

reset_password_template_idstring
import React, { useCallback } from 'react';
import { useStytchB2BClient } from '@stytch/react/b2b';

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

  const resetPasswordStart = useCallback(() => {
    stytch.passwords.resetByEmailStart({
      email_address: 'sandbox@stytch.com',
      organization_id: 'organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931',
    });
  }, [stytch]);

  return <button onClick={resetPasswordStart}>Reset Password</button>;
};

RESPONSE

200
{
    "status_code": 200,
    "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
    "member_id": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f",
    "member_email_id": "email-test-81bf03a8-86e1-4d95-bd44-bb3495224953",
    "member": {...}
}