Handle non-error responses from token function

This commit is contained in:
Nick O'Leary
2022-01-12 13:48:06 +00:00
parent 7732d52583
commit ea20342d76

View File

@@ -163,7 +163,9 @@ TokensStrategy.prototype.authenticate = function(req) {
authenticateUserToken(req).then(user => {
this.success(user,{scope:user.permissions});
}).catch(err => {
log.trace("token authentication failure: "+err.stack)
if (err) {
log.trace("token authentication failure: "+err.stack?err.stack:err)
}
this.fail(401);
});
}