-
Notifications
You must be signed in to change notification settings - Fork 800
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
WordPress.com Toolbar: fix sign out redirect #8173
Conversation
Prevously the user was redirected to wp-admin/undefined and would not be signed out properly. With new changes the sign out should work as expected and the user will be redirected to log in page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests well! 🚢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this is not working right.
I always get logged out from my site successfully but
The automagic logout from .com is weird. After clicking signout, I'm logged out from my site, and I Cannot access some sites like P2s but I'm still able to use wordpress.com (i.e. calypso) and for example see /me
without problems)
For the records... What I've just said before, happens if I'm proxied. Somehow my session for .com does not get invalidated. Dropping the proxy, shows that I need to login when visiting plain wordpress.com. @vindl if this is expected behaviour, just tell so and I'll approve this PR again. |
@oskosk not sure if it's expected, but it doesn't sound related to this PR. Could be some Calypso weirdness with logged in state while proxied. |
@vindl But what's the intended behaviour ? To log me out of my site or log me out of my site and wordpress.com ? One of those is not working 100% right. I just found one condition where it does not work. Maybe there are others. Is there a resource I can read about why we log out from wordpress.com ? I don't understand 100% why we do that. This button here looks similar to Calypso's but Calypso's does not log me out of my site, it just logs me out of the system I'm looking at. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving as the author said the issue I observed is not related to this PR. 🚢
This previously used to log us out of WP.com account too, when proxied. It's used quite a lot in AT. |
@oskosk Perhaps, though not super sure, as the case I mentioned works via SSO. |
Alright, this may be the topic for another discussion. I'm going to post about it. @ehti could you approve this PR if it works well for you so we can get it merged ? |
The intended behavior is to log out both from Jetpack site and WP.com. The reason behind this decision has to do with Atomic sites - we were trying to keep the behavior consistent after the transfer (e.g. what would happen if we performed this action on a dotcom site).
In the context of Atomic given above, I think it makes sense to log out any WP.com connected user. On the other hand that might be not be expected in case of non-Atomic Jetpack sites. |
Just a side note: I'm noticing some weirdness with logout on dotcom sites too (unrelated to Jetpack masterbar). If I open Calypso in one tab, and log out from front end masterbar in another, I can still keep browsing in the first tab even after a hard refresh. The |
Up to you folks how you'd like to go ahead with this PR, #6791 is the intended behavior as vindl mentioned for consistency. If that's good and the only case affected is when proxied (i.e. not signed out of .com), I think that might be separate indeed. :) (Don't think I can approve the PR? not sure.) |
@ehti ah don't worry. I'm merging this one then.
But take in account that there's no consistency on the proposal from #6791. When I logout from calypso I don't expect to be logged out from my sites at the same time (of course unless I'm SSOed)... If we're overriding the button that regular Jetpack users use to logout, it's not good to do magical stuff on the background for them. What if they're drafting or uploading something to Calypso on another tab to another site? This is just unexpected. |
* Changelog 5.6: create base for changelog. * Update changelog with 5.5.1 info. * Changelog: add #7930 and #8238 * Changelog: add #8076 * Changelog: add #8100 * Changelog: add #8117 * Changelog: add #8141 * Changelog: add #8143 * Changelog: add #8147 * Changelog: add #8149 * Changelog: add #8153 * Changelog: add #8173 * Changelog: add #8184 * Changelog: add #8196 * Changelog: add #8199 * Changelog: add #8093 * Changelog: add #8171 * Changelog: add #8182 * Changelog: add #8202, #8222 * Changelog: add #8228 * Changelog: add #8240 * Changelog: add #8251 * remove AL card change
Previously the user was redirected to
wp-admin/undefined
and would not be signed out properly.Fixes #8142
Testing instructions:
Sign Out
button.Note: this worked properly before, but some unrelated changes in the meantime, which I didn't track down yet, caused it to break. For reference check #6791 where we tested this behavior both for Jetpack site and WP.com side.