move secure session cookie secret to config
parent
28f9e72612
commit
a5bc1fc3e7
|
|
@ -19,6 +19,8 @@ module.exports =
|
||||||
redirect_uri : 'https://client.example.com/auth/callback'
|
redirect_uri : 'https://client.example.com/auth/callback'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// session cookie secret
|
||||||
|
cookieSecret : 'T0P-S3cR3t_cook!e',
|
||||||
// Listening hostname for `gulp live|open`.
|
// Listening hostname for `gulp live|open`.
|
||||||
domain : 'localhost',
|
domain : 'localhost',
|
||||||
tls :
|
tls :
|
||||||
|
|
|
||||||
|
|
@ -140,10 +140,10 @@ function setupAuth(oidcIssuer)
|
||||||
passport.use('oidc', oidcStrategy);
|
passport.use('oidc', oidcStrategy);
|
||||||
|
|
||||||
app.use(session({
|
app.use(session({
|
||||||
secret: 'keyboard cat',
|
secret: config.cookieSecret,
|
||||||
resave: true,
|
resave: true,
|
||||||
saveUninitialized: true,
|
saveUninitialized: true,
|
||||||
//cookie : { secure: true }
|
cookie: { secure: true }
|
||||||
}));
|
}));
|
||||||
|
|
||||||
app.use(passport.initialize());
|
app.use(passport.initialize());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue