make sure that auth result is an array

This commit is contained in:
Andris Reinman 2019-07-31 11:56:53 +03:00
parent 164f77feed
commit afacc1df07

View file

@ -370,6 +370,9 @@ class UserHandler {
this.asyncAuthenticate(username, password, requiredScope, meta)
.catch(err => callback(err))
.then(result => {
if (!Array.isArray(result)) {
result = [].concat(result || [false, false]);
}
callback(null, ...result);
});
}