1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added loginkey support to meshctrl.js, #3115

This commit is contained in:
Ylian Saint-Hilaire 2021-09-10 13:04:10 -07:00
parent f918ae537c
commit 15d8f4b027
3 changed files with 13 additions and 8 deletions

View file

@ -2767,6 +2767,7 @@ function CreateMeshCentralServer(config, args) {
if ((docs.length > 0) && (docs[0].key != null) && (obj.args.logintokengen == null) && (docs[0].key.length >= 160)) {
// Key is present, use it.
obj.loginCookieEncryptionKey = Buffer.from(docs[0].key, 'hex');
console.log('obj.loginCookieEncryptionKey', obj.loginCookieEncryptionKey);
func(obj.encodeCookie({ u: userid, a: 3 }, obj.loginCookieEncryptionKey));
} else {
// Key is not present, generate one.