this post was submitted on 10 Jun 2024
230 points (100.0% liked)

Fediverse

27910 readers
1 users here now

A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to [email protected]!

Rules

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

founded 2 years ago
MODERATORS
 

For instance, this one (link to a post to [email protected]): https://reddthat.com/post/20260613

Pasting it in your search bar should give you this kind of results:

You can then click on it to access the post from your instance (in this example, lemmy.zip: https://lemmy.zip/post/16918691)

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 10 points 5 months ago (14 children)

It would have to go through some sort of Lemmy link redirector service because a site can't access another site's cookies. And even then, with third-party cookie sandboxing, that still wouldn't work.

I don't think this is solvable without a browser extension. The best the devs could do is let you enter your home instance URL on each instance such that eventually you've configured them all and it works. But the extensions are just plain better.

[–] [email protected] 3 points 5 months ago (10 children)

Why would you need another site's browser cookies?

[–] [email protected] 1 points 5 months ago (9 children)

Because if you're on say, lemmy.world because you clicked such a link, lemmy.world has no way of knowing what your home instance is. The cookies are all sandboxed for lemmy.world's use. So even if you used a third-party site whose sole purpose is to know your home instance, it still wouldn't work because now third-party cookies are sandboxes based on the domain of the site you're visiting.

That used to be possible with a third-party. That's how the Facebook like buttons and Login with Google used to work, and those are also the reason it's no longer possible. You used to be able to just embed some JS from a third-party on a site, and that JS can access cookies from the third-party site while also being directly callable from the site that embedded it. So in that case, we could agree on a third-party lemmy redirector service whose sole purpose is to store the user's home instance in a cookie and then the script can be embedded everywhere and it would be able to spit out the URL from the cookie. But that hole's been plugged. So even if you do that, it doesn't work anymore because of stronger cookie sandboxes. But that's why you'd need third-party cookies to pull it off.

So the only fix left for this is, every lemmy instance you visit, you have to set your home instance on it, which would set a cookie that the site can actually see, then it could redirect you to your home instance to view the post. But that still kinda sucks, because you have to do it for every instance you run across.

So, cookies are useless for this.

[–] mark 1 points 5 months ago

Sites can still have third-party cookies. The first party domain just needs to explicitly allow them.

load more comments (8 replies)
load more comments (8 replies)
load more comments (11 replies)