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: clear any WP login cookies before JWT login #2103

Merged

Conversation

squigglybob
Copy link
Collaborator

@corsacca

In PG, there is an issue, where if a user logs in with the admin side which uses PHP, and then comes back to their logged in PG (with JWT token) then it has an issue and can't check the auth properly.

This might be a sledgehammer solution, and not sure if it will have any other repercussions (but I don't think it would)

But would essentially make sure, that if someone is logging in with JWT, that the WP side is logged out first.

This makes sure that the JWT check_auth function continues to work and doesn't lead to any unexpected behaviour where the check_auth doesn't return the user correctly.

@squigglybob
Copy link
Collaborator Author

It's not a deal breaker if we can't fix it as it will only affect anyone who logs into the admin side of PG, which is only us.

But not sure if there might be other places it could catch people out as well

@corsacca corsacca merged commit 2cee268 into DiscipleTools:master Jul 11, 2023
2 checks passed
@corsacca
Copy link
Member

Thanks @squigglybob !

@squigglybob squigglybob deleted the fix/logout-wp-before-jwt-login branch July 17, 2023 17:07
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.

None yet

2 participants