Skip to content

Commit

Permalink
Use cookie express store token via Redis
Browse files Browse the repository at this point in the history
  • Loading branch information
zenkiet committed Sep 21, 2023
1 parent d101d84 commit d060876
Show file tree
Hide file tree
Showing 13 changed files with 345 additions and 66 deletions.
5 changes: 4 additions & 1 deletion server/.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ JWT_SECRET=secret
JWT_AUDIENCE=localhost:3000
JWT_ISSUER=localhost:3000
JWT_ACESSS_TOKEN_TTL=3600
JWT_REFRESH_TOKEN_TTL=86400
JWT_REFRESH_TOKEN_TTL=86400\

# SESSION SECRET
SESSION_SECRET=secret
7 changes: 6 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"bcrypt": "^5.1.1",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"connect-redis": "^6.1.3",
"express-session": "^1.17.3",
"ioredis": "^5.3.2",
"nestjs-prisma": "^0.22.0",
"passport": "^0.6.0",
Expand All @@ -48,9 +50,12 @@
"@swc/core": "^1.3.86",
"@swc/jest": "^0.2.29",
"@types/bcrypt": "^5.0.0",
"@types/connect-redis": "^0.0.21",
"@types/express": "^4.17.17",
"@types/express-session": "^1.17.7",
"@types/jest": "^29.5.5",
"@types/node": "^20.6.3",
"@types/node": "^18",
"@types/passport": "^1.0.12",
"@types/passport-jwt": "^3.0.9",
"@types/supertest": "^2.0.12",
"@typescript-eslint/eslint-plugin": "^6.7.2",
Expand Down

0 comments on commit d060876

Please sign in to comment.