EasyStarter logoEasyStarter
Authentication

Email Password Login

Configure Better Auth email and password sign-up and sign-in

Email Password Login

EasyStarter's mobile app uses Better Auth for authentication, with built-in email and password sign-in.

Server configuration lives in apps/server/src/lib/auth.ts.

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 must be a sufficiently long random string.

openssl rand -base64 32

Copy the output and add it to both local and production environments:

apps/server/.dev.vars
BETTER_AUTH_SECRET=your-long-random-secret
apps/server/.env.production
BETTER_AUTH_SECRET=your-long-random-secret

Set Environment Variables

For local development, add everything to apps/server/.dev.vars:

apps/server/.dev.vars
BETTER_AUTH_SECRET=your-long-random-secret

For production, put sensitive values in apps/server/.env.production:

apps/server/.env.production
BETTER_AUTH_SECRET=your-long-random-secret

Email Password Authentication Features

The mobile authClient is configured in apps/native/lib/auth/auth.client.ts, using the @better-auth/expo adapter to handle deep link callbacks and cookie storage.

Currently supported:

  • Email/password signup and login
  • Cookie-based cross-platform session management