Password Reset
Use ResetPassword to collect an email address and request account recovery
through the active OvokClient. The SDK validates the form and handles loading,
field errors, and supported rate limits. Your app owns the confirmation copy,
support path, and navigation back to sign-in.
Compose a recovery screen
Render the screen below OvokProvider and the SDK
ThemeProvider.
import { ResetPassword } from "@ovok/native";
import { Alert } from "react-native";
export function PasswordResetScreen() {
return (
<ResetPassword>
<ResetPassword.Header>
<ResetPassword.Header.Title />
<ResetPassword.Header.Description />
</ResetPassword.Header>
<ResetPassword.Form
type="Patient"
onSuccess={() =>
Alert.alert(
"Check your email",
"If the account can be recovered, instructions will be sent.",
)
}
onError={() =>
Alert.alert(
"Request failed",
"Try again. If the problem continues, contact support.",
)
}
>
<ResetPassword.Form.Inputs />
<ResetPassword.Form.Button />
</ResetPassword.Form>
</ResetPassword>
);
}
When type is omitted, the form defaults to Patient and shows the account
type selector. Pass type="Patient" or type="Practitioner" to lock the form
to one account type and hide the selector.
Use neutral confirmation copy
The built-in success callback currently receives a generic confirmation
message. Keep the user-facing response neutral so the screen does not reveal
whether an email address is registered. For custom recovery behavior, pass
onSubmit; it replaces the default client.resetPassword request.