diff --git a/lib/oauth_middleware.js b/lib/oauth_middleware.js index 8dcc51c..b0a05db 100644 --- a/lib/oauth_middleware.js +++ b/lib/oauth_middleware.js @@ -141,10 +141,10 @@ module.exports = function oauth(options) { return function (req, res, next) { if (req.url.indexOf(options.callbackPath) === 0) { oauthCallback(req, res, next, options); - } else if (req.url.indexOf(options.loginPath) === 0) { - login(req, res, next, options); } else if (req.url.indexOf(options.logoutPath) === 0) { logout(req, res, next, options); + } else if (req.url.indexOf(options.loginPath) === 0) { + login(req, res, next, options); } else { next(); }