Skip to main content

ResetPasswordPage

The screen the password-reset e-mail links to: set a new password using the token from the URL.

SchemaAdmin mounts it by default. Pass it explicitly to hook into the result.

Example​

import {SchemaAdmin, ResetPasswordPage} from 'habarico';

<SchemaAdmin
resetPasswordPage={<ResetPasswordPage onSuccess={() => redirect('/login')} />}
{...rest}
/>

Props​

NameTypeDefaultDescription
onSuccess() => void—Runs after the password has been set
onError(error: Error) => void—Runs when the reset fails, e.g. an expired token
logoLogoSlotthe "no logo" placeholder{Component} — logo in the header
availableLanguagesLayoutLanguage[]—Languages offered by the header switcher

The token is read from the URL, and the new password is submitted through setPassword on the AuthProvider.

See also​