Issues with linked actors

AI-generated summary

The discussion revolves around issues with linked actors in the Discourse ActivityPub plugin, particularly focusing on Discourse-to-Discourse and Discourse-to-Mastodon verification. pmusaraj reported problems with verifying linked actors between Discourse instances and mastodon.social, including client errors and timeouts. angus addressed the issues by implementing fixes, including rate limiting settings and PRs to improve user API key scopes and actor creation. The PRs 30544 and 147 resolved the Discourse-to-Discourse issues, while 151 fixed the Mastodon verification problem. pmusaraj confirmed that the fixes worked on both their self-hosted instance and meta.discourse.org, and angus confirmed successful authorization on mastodon.social.

We just merged a commit that adds support for Discourse-to-Discourse linked actors on the ActivityPub plugin, however, on testing in two different instances, I am seeing issues. Filing them all here @angus so that they’re grouped together.

Discourse-to-Discourse verification: in a personal Discourse instance, I can’t add a Discourse Linked Actor from meta.discourse.org, initially I got a “failed to verify” client error, and then a timeout.

Screenshots:

Same error when trying to link my personal instance account from meta.

Discourse-to-Mastodon verification: on the personal instance, this worked Ok! Here on meta though, I can’t seem to get past the verify step for mastodon.social, I get this error: An error occurred: The access token is invalid Failed to verify client.

1 Like

Just a note that I’ve started working on this and will have an update / PR soon.

1 Like

@pmusaraj Just as an initial measure I’ve made a PR that adds settings for the rate limiting of user api key clients (which will make this hard to test this).

https://github.com/discourse/discourse/pull/30402

Could you also just check that discourse-activity-pub:read scope is added to the allow user_api key client scopes site setting. It should be automatically, but worth checking.

1 Like

@pmusaraj Just a note that in my testing on a production instance this PR

https://github.com/discourse/discourse/pull/30544

fixed this issue:

If you could let me know when this is live on meta, we can test here too.

1 Like

This change is now live on meta. With my own self-hosted instance (also up-to-date with this change), I am getting a step further, but got this error after authorizing:

I think this means we’ve fixed this issue. This error will currently occur if you don’t already have an actor on the instance as user actors are created on demand (i.e. it’s expected, albeit the message could be improved). I think this is one case where we should create them if they don’t exist. This will do that:

https://github.com/discourse/discourse-activity-pub/pull/147

2 Likes

:+1: that last PR fixes Discourse-to-Discourse authorization on my self-hosted instance, thanks!

2 Likes

I think this may be indicative of an old/destroyed OAuth app on the Mastodon side of things. Just a note that in my own tests with mastodon.social (on production instances), I was able to verify without issue. I’ve raised a PR to address this potential cause of the issue:

https://github.com/discourse/discourse-activity-pub/pull/151

1 Like

Or is used the Hub.

@pmusaraj Thanks for the merge. Just a note that I was just able to successfully authorize my Mastodon account on mastodon.social here on meta, so it looks like that PR has fixed it, but let me know if you have any more issues.

1 Like

Yes, indeed, it worked for me as well. Awesome, thank you!

1 Like

This topic was automatically closed after 20 hours. New replies are no longer allowed.