Added option to change JWT expiration time called "Login expiration" in the Advanced tab

This commit is contained in:
Isaac Abadi
2020-08-10 14:26:59 -04:00
parent 690871f6b2
commit c9b615c659
7 changed files with 21 additions and 1 deletions

View File

@@ -50,6 +50,7 @@
"multi_user_mode": false,
"allow_advanced_download": false,
"use_cookies": false,
"jwt_expiration": 86400,
"logger_level": "info"
}
}

View File

@@ -50,6 +50,7 @@
"multi_user_mode": false,
"allow_advanced_download": false,
"use_cookies": false,
"jwt_expiration": 86400,
"logger_level": "info"
}
}

View File

@@ -29,7 +29,7 @@ exports.initialize = function(input_users_db, input_logger) {
************************/
saltRounds = 10;
JWT_EXPIRATION = (60 * 60); // one hour
JWT_EXPIRATION = config_api.getConfigItem('ytdl_jwt_expiration');
SERVER_SECRET = null;
if (users_db.get('jwt_secret').value()) {

View File

@@ -227,6 +227,7 @@ DEFAULT_CONFIG = {
"multi_user_mode": false,
"allow_advanced_download": false,
"use_cookies": false,
"jwt_expiration": 86400,
"logger_level": "info"
}
}

View File

@@ -152,6 +152,10 @@ let CONFIG_ITEMS = {
'key': 'ytdl_use_cookies',
'path': 'YoutubeDLMaterial.Advanced.use_cookies'
},
'ytdl_jwt_expiration': {
'key': 'ytdl_jwt_expiration',
'path': 'YoutubeDLMaterial.Advanced.jwt_expiration'
},
'ytdl_logger_level': {
'key': 'ytdl_logger_level',
'path': 'YoutubeDLMaterial.Advanced.logger_level'