Select Git revision
auth.ts
-
Sofiane Lasri authored
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.
Sofiane Lasri authoredAdd 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.