email-and-password-best-practices
Configure email verification, implement password reset flows, set password policies, and customise hashing algorithms for Better Auth email/password authentication. Use when users need to set up login, sign-in, sign-up, credential authentication, or password security with Better Auth.
Security Assessment
About email-and-password-best-practices
The 'email-and-password-best-practices' skill provides a comprehensive solution for handling user authentication via email and password using Better Auth. It helps implement essential security features like email verification, password reset flows, and custom password policies. This skill ensures that users have a streamlined and secure experience when logging in, signing up, or resetting their passwords. By integrating this skill, developers can easily set up robust email/password authentication mechanisms without the need to build complex infrastructure from scratch. It primarily addresses the need for reliable user authentication and password security systems in modern applications.
FAQ
How do I enable email/password authentication?
To enable email/password authentication, set `emailAndPassword: { enabled: true }` in the configuration.
Can I customize the email content sent during the verification process?
Yes, you can customize the email content by configuring the `sendVerificationEmail` function in the `emailVerification` setup.
What happens if the user doesn't verify their email?
If `requireEmailVerification` is enabled, users won't be able to sign in until they verify their email. A new verification email will be sent on each sign-in attempt for unverified users.
Are there any token expiration settings for password reset?
Yes, by default, reset tokens expire after 1 hour. You can customize this duration using `resetPasswordTokenExpiresIn` in seconds.
Does this skill support background tasks for email sending?
Yes, the skill supports background task handling for email sending and other asynchronous operations, particularly useful on serverless platforms.
Install email-and-password-best-practices
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
better-auth/skills