diff --git a/src/config/index.js b/src/config/index.js index 8a25051..59d862f 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -1,8 +1,12 @@ +if (!process.env.SECRET) { + throw new Error('SECRET environment variable is required and must not be empty'); +} + const config = { - secret: process.env.SECRET || 'acapisecret', + secret: process.env.SECRET, session_lifetime: parseInt(process.env.SESSION_LIFETIME) || 21600, // 21600 secondes = 6 heures initAuth: () => { require('./passport-local');