https://github.com/robimez/svelter-auth
https://github.com/robimez/svelter-auth
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/robimez/svelter-auth
- Owner: RobiMez
- Created: 2025-01-02T14:59:11.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-15T23:39:31.000Z (about 1 month ago)
- Last Synced: 2025-04-02T23:35:42.143Z (13 days ago)
- Language: Svelte
- Homepage: https://svelter-auth.vercel.app
- Size: 176 KB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - Link
README
# Stuff i did
## Basic setup
- `npx sv create`
- `pnpm add better-auth`
- Create `.env` file
- Create `src/auth.ts` file
- `pnpm i dotenv`
- Decided to use postgres## Database
- Create `src/db.ts` file
- Install pg and types
- `pnpm i --save-dev @types/node`
- `pnpm i --save-dev @types/pg`
- Added a postgres url to `.env`
- `npx @better-auth/cli generate`
- `npx @better-auth/cli migrate`## Authentication Setup
- Create `hooks.server.ts`
- Create `src/lib/auth-client.ts`## Ui
- 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 email and password auth
- Added signin signup and signout functionality with email and password
- Added edit user functionality## Email Verification
- Added email verification with resend
- Added forget and reset password functionality## Github Auth
- Added github auth
- Added github account linking
- Added a toast for when betterauth doesnt let you sign in with a private email github account## Switched to mongodb
- Added mongodb adapter
- added chalk for logging