Skip to content

Commit

Permalink
Improve cookie security using __Host- if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
mvantellingen committed Feb 10, 2024
1 parent 910e642 commit 280da10
Show file tree
Hide file tree
Showing 7 changed files with 1,983 additions and 3,925 deletions.
5 changes: 5 additions & 0 deletions .changeset/violet-sheep-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@labdigital/federated-token": minor
---

Improve cookie security settings by using \_\_Host- where needed
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pnpm-lock.yaml

node_modules/*
coverage/*
dist/*
test-reports/*
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ implemented via 4 cookies:
- `refreshToken` - The refresh token, if any. It is stored as HTTP_ONLY cookie.
- `refreshTokenExists` - A boolean value that indicates if a refresh token
exists for the user. It is used to determine if the user is new or not.

Note that this expects the "cookie-parser" express middleware to be used.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,18 @@
"lodash.isequal": "^4.5.0"
},
"devDependencies": {
"@apollo/server": "^4.10.0",
"@apollo/gateway": ">= 2.4",
"@apollo/server-gateway-interface": "1.1.0",
"@changesets/cli": "^2.26.2",
"@sentry/types": "7.55.0",
"@types/cookie": "^0.6.0",
"@types/cookie-parser": "^1.4.3",
"@types/express": "^4.17.17",
"@types/lodash.isequal": "^4.5.6",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@vitest/coverage-v8": "0.32.2",
"cookie": "^0.6.0",
"eslint": "^8.40.0",
"eslint-plugin-unused-imports": "^2.0.0",
"node-mocks-http": "^1.12.2",
Expand Down
Loading

0 comments on commit 280da10

Please sign in to comment.