Features
- Password reset
- Password policies
- Password hashing and security
Overview
With an SMTP provider configured on your database, users with emails can reset their passwords with a two step process. First, the users requests a link to be sent to their email address. The auth service creates a token (saved to theauth.verification_tokens table in your database), and sends it in an email. The token is valid for 4 hours by default.
Installation
Usage
/user/reset-password
Once the user clicks on the link, they will be redirected to your app and will be able to securely reset their password.
/user/change-password
API
PasswordResetRequestForm Props
PasswordResetForm Props
Internal Functionality
- Uses
useFormfrom React Hook Form to handle form state. - Calls
useResetPasswordwith the provided email and password upon form submission. - Implements password confirmation validation to ensure the user inputs matching passwords.
- Supports lifecycle hooks (
beforeMutate,onSuccess,onError) for request customization. - Disables the submit button if passwords do not match or required fields are missing.