Fix tokensStrategy order

This commit is contained in:
KAZUHIRO ITO 2020-02-27 19:41:59 +09:00
parent 95982ad464
commit 458d794f52

View File

@ -61,7 +61,7 @@ function init(_settings,storage) {
function needsPermission(permission) {
return function(req,res,next) {
if (settings && settings.adminAuth) {
return passport.authenticate(['bearer','anon','tokens'],{ session: false })(req,res,function() {
return passport.authenticate(['bearer','tokens','anon'],{ session: false })(req,res,function() {
if (!req.user) {
return next();
}