Skip to content

Conversation

@xiaozhongliu
Copy link

when requesting /oauth/logout, the relevant if branch of "logoutPath" won't get reached.
because the url will match /oauth , the if branch of "loginPath" will intercept the execution.

when requesting /oauth/logout, the relevant if branch of "logoutPath" won't get reached.
because the url will match /oauth , the if branch of "loginPath" will intercept the execution.
@mention-bot
Copy link

@xiaozhongliu, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fengmk2, @hbbalfred and @iwillwen to be potential reviewers.

@xiaozhongliu
Copy link
Author

@fengmk2 not able to add a reviewer, so @ you here :)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants