-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support auto-redirection by <link rel=alternate type=application/activitypub+json>
?
#105
Comments
What does this have to do with MissKey hmm? SecurityIn any way, we would need to make sure to not introduce a CSRF risk, because whatever we may only do a redirect to an existing site on such as a click and other link opening, we should never directly execute an action. The idea
That is new and sounds great, actually. As such, I think this is a great idea and code-improvement/refactoring (as the mechanism/result should not change for the user).
Feel free to contribute whereever you want. However, i'd gladly accept contributions here, too. |
Because it's supported there too! (
Yup, I agree that the redirection to the page is enough, and the user can do the action themself after checking the redirection result. The point is when the redirection happens:
I don't see much value to support redirection by |
Okay, read some more about this and found w3c/activitypub#310, it does not seem to be really standardized (yet), but anyway... it would be good enough to support.
Hmm, we need hooks anyway to react on things as far as I see. However that link header could be useful for implementation, as it simplifies this a lot and could e.g. help for #86, i.e. we do not need to open a popup/redirect to that and catch that again in any case. It's refactoring that could be done when doing that. |
Ah okay, now I understand, so opening any link or so redirects this to your home instance, even if you do not wanted to interact with it. That sounds like a good idea, too. Maybe optional though as it could be quite unexpected. The question would be does it also work with user profiles, i.e. the pages where you usually press the follow button? I guess it should, should not it? |
Yes for Mastodon and Misskey, haven't tested it on Pleroma. A caveat with non-immediate redirect is that |
Hmm, I've been using the immediate redirection for some days and the experience wasn't perfect. Could be better if:
What do you think? |
Background
It seems the redirection happens only when the interaction popup opens, but what if opening a remote instance can automatically redirect to the home instance, with more generic method than being too implementation-specific?
(I saw you showed some interest in raikasdev/mastodon4-redirect#6 which also does the auto redirection)
Proposed solution
Mastodon and Misskey inject
<link rel=alternative type=application/activitypub+json href=(object id)>
to the page, that way one can know the page can be loaded as an ActivityPub object. Since Mastodon has an API to resolve such object id, the extension can call the API to get a home instance URL and do the redirect.Here is a proof of concept written as a userscript: https://gist.github.com/saschanaz/701908eb329af5991061f8813b5bf4bc
Alternatives
Additional context
(This may replace #104 and the existing Mastodon matcher)
The text was updated successfully, but these errors were encountered: