mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Supporter simpleauth lorsque mode development
This commit is contained in:
parent
5760469e60
commit
9f4414f68c
2 changed files with 11 additions and 1 deletions
9
server/auth_config-development.json
Normal file
9
server/auth_config-development.json
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"auth": {
|
||||||
|
"simpleauth": {
|
||||||
|
"enabled": true,
|
||||||
|
"name": "provider3",
|
||||||
|
"SESSION_SECRET": "your_session_secret"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue