feat: enhance authentication and user management with token-based system
- Implemented robust token-based authentication with access and refresh tokens - Added JWT token generation, verification, and rotation mechanisms - Created services for token management, Memcached, and MinIO storage - Enhanced user registration and login with device-specific tokens - Added support for profile picture upload and management via MinIO - Implemented secure password hashing with crypto - Updated Prisma schema to support refresh tokens and profile picture storage - Added GraphQL mutations for logout, token refresh, and profile picture handling - Integrated environment configuration with Zod validation - Improved error handling and authentication middleware
This commit is contained in:
parent
d4d99fb5e7
commit
d29d116214
22 changed files with 1992 additions and 388 deletions
|
@ -10,7 +10,7 @@
|
|||
"test": "ts-node --test test/**/*.test.ts",
|
||||
"start": "node dist/index.js",
|
||||
"dev": "nodemon --delay 2000ms src/index.ts",
|
||||
"prisma:generate": "dotenv -e ../../.env.local -- prisma generate",
|
||||
"prisma:generate": "prisma generate",
|
||||
"prisma:migrate": "dotenv -e ../../.env.local -- prisma migrate dev",
|
||||
"prisma:init": "dotenv -e ../../.env.local -- prisma migrate dev --name init",
|
||||
"build": "tsc"
|
||||
|
@ -19,19 +19,25 @@
|
|||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@fastify/cookie": "^11.0.2",
|
||||
"@fastify/cors": "^11.0.0",
|
||||
"@keyv/memcache": "^2.0.1",
|
||||
"@prisma/client": "^6.4.1",
|
||||
"dotenv": "^16.4.7",
|
||||
"fastify": "^5.2.1",
|
||||
"fastify-plugin": "^5.0.0",
|
||||
"graphql": "^16.10.0",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"mercurius": "^16.1.0",
|
||||
"mercurius-codegen": "^6.0.1",
|
||||
"minio": "^8.0.4",
|
||||
"uuid": "^11.1.0",
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@repo/eslint-config": "*",
|
||||
"@repo/typescript-config": "*",
|
||||
"@types/jsonwebtoken": "^9.0.9",
|
||||
"prisma": "^6.4.1",
|
||||
"typescript": "5.8.2"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue