Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Cannot edit Jetpack posts in Calypso if Single Sign-on (SSO) is off in Jetpack Settings #48477

Open designsimply opened 3 years ago

designsimply commented 3 years ago

Steps to reproduce

  1. Go to /wp-admin/ for a Jetpack site and log in if prompted.
  2. Go to WP Admin > Jetpack > Settings.
  3. Disable everything in the "WordPress.com login" section (aka turn off SSO).
  4. Clear browser cache.
  5. Go to WordPress.com and log in as the Jetpack-connected user.
  6. Go to My Sites > Site > Posts > Add new post.
  7. Log in to the Jetpack site when prompted.
  8. Observe that you land in WP Admin not Calypso (and not even in the editor).
  9. Go back to WordPress.com > My Sites > Posts > Add new post.
  10. Observe that you are prompted to log in again.
  11. Observe that you land in WP Admin not Calypso.
  12. Browse to WordPress.com > My Sites > Site > Posts > Add new post.
  13. Observe that you are prompted to log in again.
  14. Observe that you land in WP Admin not Calypso.

What I expected

I expected to be able to create or edit a post for a Jetpack site through Calypso if I am logged in to WordPress.com as the Jetpack-connected user for the site.

What happened instead

When I try to create or edit a post from a Jetpack site through Calypso while logged in to WordPress.com at the Jetpack-connected user, if I have Single Sign-on disabled then I am re-directed to WP Admin and prompted for a log in every single time.

Browser / OS version

Firefox 84.0 / macOS 10.15.6

Screenshot / Video

Video: 5m38s Tested using Firefox 84.0 on macOS 10.15.6 with a WordPress 5.6 Jetpack 9.2.1 site footed-loon.jurassic.ninja and using the Jetpack-connected WordPress.com account testuser0313.

cannot-edit-jetpack-posts-in-calypso-with-sso-off-5m38s

Context / Source

Found some related problems while #beta-testing WPDesktop 6.7.0-beta1 and decided to see how editing posts was working for a similar flow in Calypso, but it wasn't working.

johneburton commented 3 years ago

I'm having the exact same problem. When I click on "write post" a popup comes up that asks me if I want to turn on the SSO or if I want to continue to the browser. I clicked on SSO, but it just took me to a page not found on my site.

...wp-admin/post-new.php?calypsoify=1&block-editor=1&frame-nonce=1608679553%3A1%3A920a07437bebda9abd445a54222e175f&origin=http%3A%2F%2F127.0.0.1%3A41050&environment-id=desktop&in-editor-deprecation-group=1

If I try to write a post in the app again, the popup doesn't appear...and I'm taken to the browser again...same page not found. I have no way to use the app to write posts.

I currently have the following turned on in Jetpack

https://user-images.githubusercontent.com/76456799/102832048-f0e96780-43b2-11eb-88fe-00d27c3a17e4.mp4

: Allow users to log in to this site using WordPress.com accounts

samiff commented 3 years ago

Noting that this came up in JP 9.8 internal testing: p8oabR-FS-p2#comment-5363

I'm able to reproduce the issue of being redirected to wp-admin from Calypso when SSO is off.

jeherve commented 2 years ago

This also came up in p1638384722171700-slack-C0299DMPG