Add email+password login #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Currently only social login (Google, GitHub) is available. Some users prefer email+password or don't have accounts with the supported providers.
What to do
Add email and password authentication via Better Auth's built-in email+password provider.
Files to change
apps/api/src/lib/auth.ts— enable the email+password provider in thebetterAuth()config. Better Auth supports this natively.apps/web/src/routes/login.tsx— add email/password input fields and a sign-up/sign-in form alongside the social buttons.apps/web/src/lib/auth-client.ts— use Better Auth'ssignIn.email()andsignUp.email()methods.Acceptance criteria
Notes
Better Auth handles password hashing and the user/session tables already exist. The
usertable hasemail(unique) andnamefields. Theaccounttable links providers to users, so a user who signs up with email can later link a social provider.See Better Auth docs: https://www.better-auth.com/docs/authentication/email-password