Update auth.js

This commit is contained in:
Robert Richter 2019-02-25 15:35:26 +01:00
parent a2101cfbe9
commit 3153df2289

View File

@ -6,8 +6,8 @@ module.exports = function (app, app_cfg, db, bcrypt, passport, LocalStrategy) {
app.use(session({ app.use(session({
store: new SQLiteStore({ store: new SQLiteStore({
db: app_cfg.global.database, //db: app_cfg.global.database,
concurrentDB: true //concurrentDB: true
}), }),
secret: app_cfg.global.sessionsecret, secret: app_cfg.global.sessionsecret,
resave: false, resave: false,
@ -58,6 +58,8 @@ module.exports = function (app, app_cfg, db, bcrypt, passport, LocalStrategy) {
res.redirect('/login') res.redirect('/login')
} }
//TODO: ensureAuthenticated für admin-user erstellen
return{ return{
ensureAuthenticated: ensureAuthenticated ensureAuthenticated: ensureAuthenticated
}; };