Skip to content

Commit 1207f28

Browse files
committed
feat(login): Add Lax cookie policy
1 parent f9abd83 commit 1207f28

File tree

4 files changed

+598
-546
lines changed

4 files changed

+598
-546
lines changed

config/production.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ module.exports = {
3131
secret: '&é"(§è!çà)-azertyuiop1234567890%',
3232
name: 'lvconnect',
3333
isSecure: true,
34+
isSameSite: 'Lax',
3435
},
3536
},
3637
mongodb: {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"hapi": "^16.0.1",
3939
"hapi-auth-basic": "^4.2.0",
4040
"hapi-auth-bearer-token": "^4.2.1",
41-
"hapi-auth-cookie": "^6.1.1",
41+
"hapi-auth-cookie": "7.0.0",
4242
"inert": "^4.0.2",
4343
"joi": "^10.0.5",
4444
"kue": "^0.11.1",
@@ -64,7 +64,7 @@
6464
"chai": "^3.5.0",
6565
"commander": "^2.9.0",
6666
"eslint": "^3.8.1",
67-
"eslint-config-airbnb-base": "^11.0.0",
67+
"eslint-config-airbnb-base": "^11.2.0",
6868
"eslint-plugin-import": "^2.0.1",
6969
"mocha": "^3.0.2",
7070
"nodemon": "^1.10.2"

server/login/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ exports.register = (server, { cache, cookie }, next) => {
1919
cookie: cookie.name,
2020
redirectTo: cookie.redirect,
2121
isSecure: cookie.isSecure,
22+
isSameSite: cookie.isSameSite,
2223
clearInvalid: true,
2324
validateFunc(request, session, callback) {
2425
request.server.app.cache.get(session.sid, (err, cached) => {

0 commit comments

Comments
 (0)