Add authentication system with next-auth (CredentialsProvider + JWT)
- Login page with email/password - Auth middleware (proxy) protecting all routes - Seed endpoint for admin user creation (admin@optiquestock.com / admin123) - Session provider wrapping root layout - User info + logout button in header - Updated POS sales route to track authenticated user
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
"@tanstack/react-query": "^5.82.0",
|
||||
"@tanstack/react-table": "^8.21.3",
|
||||
"@types/qrcode": "^1.5.6",
|
||||
"bcryptjs": "^3.0.3",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"cmdk": "^1.1.1",
|
||||
@@ -84,6 +85,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4",
|
||||
"@types/bcryptjs": "^3.0.0",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
"bun-types": "^1.3.4",
|
||||
|
||||
Reference in New Issue
Block a user