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

Jetpack Connect: Confusing Social Login flow when user doesn't have a WPCOM account yet. #88681

Open ivan-ottinger opened 8 months ago

ivan-ottinger commented 8 months ago

Impacted plugin

Jetpack

Quick summary

The current Jetpack Connect flow links to the following Login page:

Markup on 2024-03-19 at 16:14:59

When connecting a self-hosted Jetpack site to WordPress.com account that doesn't exist yet using "Continue with..." buttons, the flow gets confusing.

This seems to be a long-standing issue.


Steps to reproduce

  1. Create a test self-hosted Jetpack site.
  2. Open a new / incognito browser window and make sure you are not logged in to any WordPress.com account there.
  3. Log in to your new test site's WP Admin.
  4. Navigate to the Jetpack settings page and click on the "Finish setting up Jetpack" button (and then "Connect your user account") to connect your test site with WordPress.com account.
  5. Click on one of the "Continue with..." buttons and make sure to use an (Google / Apple / GitHub) account that hasn't been linked with any WordPress.com account yet.
  6. Follow the steps and observe the flow.

A clear and concise description of what you expected to happen.

If the Google / Apple / GitHub account hasn't been linked with any WordPress.com account before, the flow should probably let the user create new WordPress.com account first and then link it with their Jetpack site automatically (as soon as the WordPress.com account is created).

What actually happened

The system tries to log in the user, but since their WordPress.com account doesn't exist, the flow has different outcome depending on the service used.

For instance, if we try to log in with Google, the following message gets displayed and the user might get stuck there, not knowing what to do next:

Markup on 2024-03-19 at 16:17:03

If we log in with GitHub, we get the following message:

Markup on 2024-03-19 at 16:22:57

This message at least informs the user what is going on and provides the next step, but when they create their WordPress.com account, the original flow of connecting the Jetpack site is exited and the user ends up with WordPress.com account, but without their Jetpack site connected.

I haven't tested the flow with Apple account, but I expect similar behavior.

Impact

All

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Self-hosted

Logs or notes

No response

jeherve commented 8 months ago

Moving this to the Calypso repo, where the flow lives.

github-actions[bot] commented 8 months ago

Support References

This comment is automatically generated. Please do not edit it.

simison commented 8 months ago

@oskosk @jeherve which team on Jetpack could look into this?

jeherve commented 8 months ago

@rcanepa Do you have any insights on this, since you had worked on #50203 back in the day?

rcanepa commented 8 months ago

I read a few posts around the time we shipped a login experience based on magic links, and I couldn't find anything useful. The closest thing I found is that social links should create a WordPress.com account if there is none associated with the social one selected, which, I understand, is not even happening.

I failed to find supporting evidence for what I'm about to say, but, around that time, I believe that we decided to hide social links from the Jetpack Connection flow.

ivan-ottinger commented 7 months ago

I failed to find supporting evidence for what I'm about to say, but, around that time, I believe that we decided to hide social links from the Jetpack Connection flow.

If there's no bandwidth to review and fix each social signup flow separately at the moment, I think this is a good way to go - as even the users that already have one of their social accounts linked can still log in using their email address; and we won't be losing new users.