Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix an err in oauth midware #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix an err in oauth midware #52

wants to merge 1 commit into from

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 :)

} 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