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

display flash errors for external auths like saml or oidc on the login screen #6154

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-06-11 20:06:19 +01:00
parent 74d6252699
commit d7341ab153
5 changed files with 62 additions and 1 deletions

View file

@ -404,4 +404,19 @@ module.exports.convertStrArray = function (object, split) {
} else {
return []
}
}
module.exports.uniqueArray = function (a) {
var seen = {};
var out = [];
var len = a.length;
var j = 0;
for(var i = 0; i < len; i++) {
var item = a[i];
if(seen[item] !== 1) {
seen[item] = 1;
out[j++] = item;
}
}
return out;
}