Supporter simpleauth lorsque mode development

This commit is contained in:
C. Fuhrman 2025-03-06 12:03:18 -05:00
parent 5760469e60
commit 9f4414f68c
2 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,9 @@
{
"auth": {
"simpleauth": {
"enabled": true,
"name": "provider3",
"SESSION_SECRET": "your_session_secret"
}
}
}

View file

@ -1,6 +1,7 @@
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
const pathAuthConfig = './auth_config.json'; // set pathAuthConfig to './auth_config-development.json' if NODE_ENV is set to development
const pathAuthConfig = process.env.NODE_ENV === 'development' ? './auth_config-development.json' : './auth_config.json';
const configPath = path.join(process.cwd(), pathAuthConfig); const configPath = path.join(process.cwd(), pathAuthConfig);