Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/oauth_middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's different here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fengmk2 using the original code, when you visit '/oauth/logout', login() gets called.

login(req, res, next, options);
} else {
next();
}
Expand Down