Email Password Login
Configure Better Auth email and password sign-up and sign-in
Email Password Login
EasyStarter uses Better Auth as its authentication solution, with built-in email and password sign-in.
The server-side configuration lives in apps/server/src/lib/auth.ts.
If you enable email verification or forgot password, complete the Email Service setup first.
Required Environment Variables
BETTER_AUTH_SECRET=Get BETTER_AUTH_SECRET
BETTER_AUTH_SECRET is used by Better Auth to sign and encrypt session data. It should be a sufficiently long random string.
You can generate one yourself, for example:
openssl rand -base64 32Copy the generated value into:
BETTER_AUTH_SECRET=your-long-random-secretBETTER_AUTH_SECRET=your-long-random-secretSet the environment variables
For local development, it is simplest to put everything into apps/server/.dev.vars:
BETTER_AUTH_SECRET=your-long-random-secretFor production, keep the sensitive values in apps/server/.env.production:
BETTER_AUTH_SECRET=your-long-random-secretEmail Password Authentication Features
In EasyStarter, email password authentication currently handles:
- Email/password sign-up and sign-in
- Email verification
- Forgot password
- Cookie-based session management
Core config file:
apps/server/src/lib/auth.ts