Remove passport

This commit is contained in:
Johannes Zellner
2020-02-06 14:50:12 +01:00
parent 58d8f688e5
commit 12aa8ac0ad
8 changed files with 129 additions and 187 deletions

View File

@@ -121,7 +121,7 @@ function validateToken(accessToken, callback) {
tokendb.getByAccessToken(accessToken, function (error, token) {
if (error && error.reason === BoxError.NOT_FOUND) return callback(null, null /* user */, 'Invalid Token'); // will end up as a 401
if (error) return callback(error); // this triggers 'internal error' in passport
if (error) return callback(error);
users.get(token.identifier, function (error, user) {
if (error && error.reason === BoxError.NOT_FOUND) return callback(null, null /* user */, 'Invalid Token'); // will end up as a 401