Closed thehenrybyrd closed 1 year ago
More context about the userless state: p1HpG7-aJm-p2 and https://jetpack.com/2021/05/04/97-improvements-for-your-site/ This is quite new, so I suspect there aren't many userless sites out there currently, but they will likely increase so we should make sure to account for them. cc: @ashiagr for Raven's awareness, as we chatted about this a bit (though the behavior is different in Android)
cc @leandroalonso , @momo-ozawa
The current Jetpack Connection Flow in the apps assumes that “connected to Jetpack” == “site connected + user authorized”. As a result, the user gets stuck in a login loop, since the Jetpack Login screen only works if the user is already authorized.
pcdRpT-og-p2
We should revisit this (likely as part of a maintenance week rotation) if the expectation changes regarding support of site-only connections in mobile.
pcdRpT-og-p2#comment-427
A user has reported this in 6009848-zen
I keep logging on to stats and you just take me to the login page again the email is correct and the password is correct I changed it
Jetpack for iOS 21.7.2 iPhone 12 Pro iOS, 15.6.1
Woo iOS solves this issue by doing Jetpack installation and activation steps by calling the wp/v2/plugins
endpoint directly, and Jetpack connection is handled in a web view after fetching the connection URL from Jetpack REST API (See fetchJetpackConnectionURL())
To solve this particular issue, we could try borrowing some of the concepts to allow authorizing and connecting to .com account for site-only connection.
Expected behavior
I expected to be able to connect Jetpack to my WordPress.com account via the WP app. Normally this is done from My Site > Stats, with "Set up" if Jetpack is already installed.
Actual behavior
However, with a Jetpack connection that is userless ("site-connection" state), the "Set up" button takes me through the login flow as usual but doesn't complete the connection. I end up back on Stats with the "Log in" button still there, and going through the login flow again continues to bring me back to Stats with the "Log in" button. I can exit Stats, switch sites, even close the app, and I still have the "Log in" button there.
In order to eventually fix this and get connected properly, I have to login to wp-admin and connect there. It's not possible from within the app once a userless state is achieved.
https://user-images.githubusercontent.com/15107387/118107588-9b583a80-b3e7-11eb-95b2-c55bdab0eaea.mp4
Steps to reproduce the behavior
Getting to a userless state, two ways: A: With a tastewp.com site
B: With another self-hosted site
Another way to tell that your site is userless is to go into wp-admin > Jetpack and scroll down to Connections, where you'll see this:
Tested on iPhone 12 Mini, iOS 14.5.1, WPiOS 17.3
Tested on iPhone SE (old), iOS 14.4.2, WPiOS 17.1 and 17.2