Revert "Attach accessTokens to req for further use"
This reverts commit 895812df1e9226415640b74a001c1f8c1affab01.
This commit is contained in:
@@ -92,7 +92,7 @@ function initialize(callback) {
|
||||
});
|
||||
}));
|
||||
|
||||
passport.use(new BearerStrategy({ passReqToCallback: true }, function (req, accessToken, callback) {
|
||||
passport.use(new BearerStrategy(function (accessToken, callback) {
|
||||
tokendb.get(accessToken, function (error, token) {
|
||||
if (error && error.reason === DatabaseError.NOT_FOUND) return callback(null, false);
|
||||
if (error) return callback(error);
|
||||
@@ -116,9 +116,6 @@ function initialize(callback) {
|
||||
tokenType = tokendb.TYPE_USER;
|
||||
}
|
||||
|
||||
// attach accessToken to req for further use
|
||||
req.accessToken = accessToken;
|
||||
|
||||
userdb.get(token.identifier, function (error, user) {
|
||||
if (error && error.reason === DatabaseError.NOT_FOUND) return callback(null, false);
|
||||
if (error) return callback(error);
|
||||
|
||||
Reference in New Issue
Block a user