-
- Downloads
feat(auth): implement authentication system with register, login, and middleware
Add API endpoints for user registration and login using bcrypt for password hashing and comparison. Introduce a Pinia store for managing authentication state, including login, register, and logout actions. Implement middleware to protect admin routes, redirecting unauthenticated users to the login page. Integrate Prisma for database interactions.
Showing
- middleware/auth.ts 6 additions, 0 deletionsmiddleware/auth.ts
- server/api/auth/login.ts 23 additions, 0 deletionsserver/api/auth/login.ts
- server/api/auth/register.ts 29 additions, 0 deletionsserver/api/auth/register.ts
- server/api/auth/userExists.ts 6 additions, 0 deletionsserver/api/auth/userExists.ts
- server/prisma.ts 5 additions, 0 deletionsserver/prisma.ts
- stores/auth.ts 64 additions, 0 deletionsstores/auth.ts
middleware/auth.ts
0 → 100644
server/api/auth/login.ts
0 → 100644
server/api/auth/register.ts
0 → 100644
server/api/auth/userExists.ts
0 → 100644
server/prisma.ts
0 → 100644
stores/auth.ts
0 → 100644
Please register or sign in to comment