npx sv createpnpm add better-auth- Create
.envfile - Create
src/auth.tsfile pnpm i dotenv- Decided to use postgres
- Create
src/db.tsfile - Install pg and types
pnpm i --save-dev @types/nodepnpm i --save-dev @types/pg- Added a postgres url to
.env npx @better-auth/cli generatenpx @better-auth/cli migrate
- Create
hooks.server.ts - Create
src/lib/auth-client.ts
- Create
src/lib/components/AuthCard.svelte - install phosphor-svelte
- Made ui for sign in, sign up, and forgot password
- Tried to get as close to the original design as possible
- Decided it was shit and started over with shadcn-svelte
- Turned out to be a very good decision
- LOTS of changes on this commit but ignore it and look at the next commits for auth implementations
- Added signin signup and signout functionality with email and password
- Added edit user functionality
- Added email verification with resend
- Added forget and reset password functionality
- Added github auth
- Added github account linking
- Added a toast for when betterauth doesnt let you sign in with a private email github account
- Added mongodb adapter
- added chalk for logging