Automattic / jetpack

Security, performance, marketing, and design tools β€” Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 797 forks source link

[Mastodon] Jetpack Social Connection fails to integrate with Mozilla.social #34822

Open DeadSuperHero opened 10 months ago

DeadSuperHero commented 10 months ago

Impacted plugin

Social

Quick summary

The Mastodon integration for Jetpack is super, super useful, and helps us auto-post our articles out to our Mastodon followers. We moved from Mastodon.social to Mozilla.social, as we believed this to be a positive thing for our brand. However, Mozilla.social never allows for the connection to be completed. It appears that one complication may come from how Mozilla is doing account management, as users must sign in to the instance using Mozilla Accounts.

Steps to reproduce

  1. Start at https://wordpress.com/marketing/connections/youdomain.tld (alternatively, use the Jetpack for Mobile app and find the equivalent page)
  2. Click "Connect" next to the Mastodon option.
  3. Enter any Mastodon username in the box at the mozilla.social domain. In our case, @wedistribute@mozilla.social
  4. The OAuth page for Mozilla.Social will appear with error details.

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

When connecting to any Mastodon instance, it is expected that the pop-up window presents the Mastodon OAuth page for the app. Upon accepting, the window is supposed to close, and the integration connection is completed.

What actually happened

The Mozilla.Social OAuth page, normally used for approving the app permissions, is displayed with the following error message:

Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.

image

Impact

One

Available workarounds?

No and the platform is unusable

Platform (Simple and/or Atomic)

No response

Logs or notes

This happens both on web and Android app versions of Jetpack, when attempting to connect to Mozilla.social. Other servers work fine, so I believe the problem may boil down to either Mozilla's own account management system, or a lack of whitelisting Jetpack as a viable client. Still, it's worth testing and verifying a fix.

liviopv commented 10 months ago

πŸ“Œ TRIAGE ACTIONS

πŸ“Œ Message to Author @DeadSuperHero since Mozilla Social is invite-only now, could you share an invite code so we can test this?

bakulf commented 10 months ago

@liviopv I can help with the invitation code. I can provide tokens to debug this issue. Write me an email (baku mozilla com).

Debugging this issue on our side, I see that wordpress.com uses an invalid app client_id. Do you know how this is obtained and how often is regenerated?

liviopv commented 10 months ago

πŸ“Œ REPRODUCTION RESULTS

πŸ“Œ FINDINGS/SCREENSHOTS/VIDEO

Image

πŸ“Œ ACTIONS

πŸ“Œ Message to Author @DeadSuperHero I managed to get an invite, so no need. I imagine the issue might be a conflict between how we're expecting the user to log in and how Mozilla makes the user log in. This will be escalated to the appropriate team so they can investigate further.

jeherve commented 10 months ago

I'm wondering if this may be linked to this Mastodon issue: https://github.com/mastodon/mastodon/issues/27740

@Automattic/jetpack-reach Do you have an idea on how this could be addressed on our side?

bakulf commented 10 months ago

I suggest following this comment: https://github.com/mastodon/mastodon/issues/27740#issuecomment-1806254860 verifying the credential before continuing with the authentication flow.

jeherve commented 10 months ago

I suggest following this comment: mastodon/mastodon#27740 (comment) verifying the credential before continuing with the authentication flow.

We do call verify_credentials as folks hit connect during the authentication flow, so I'm afraid the solution will need to be different here. :(

spsiddarthan commented 10 months ago

Other servers work fine

Could you give me the name of a different served you tested with? I wanted to sign up on it and try.

I believe the problem may boil down to either Mozilla's own account management system

I do wonder if that's the case, but we will have to test some more to be sure.

Thanks for the ping, @jeherve

spsiddarthan commented 10 months ago

We are investigating this still, I will report back with an update as soon as we have one.

manzoorwanijk commented 5 months ago

This still seems to be an issue.