LemmyNet / lemmy

🐀 A link aggregator and forum for the fediverse
https://join-lemmy.org
GNU Affero General Public License v3.0
13.22k stars 877 forks source link

Sync Users #3164

Closed ghost closed 1 year ago

ghost commented 1 year ago

Requirements

Is your proposal related to a problem?

Due to the fragmented nature of the Lemmyverse, I have multiple accounts to access content that is not visible from an instance or another. It becomes tiresome to manage subscriptions to the same communities across different accounts. While import/export functionality would be useful, I believe implementing an account sync feature would be even better.

Describe the solution you'd like.

I propose the implementation of a user account sync feature that allows users to synchronize their settings, subscriptions, blocks, upvotes/downvotes, saved posts, read posts and other relevant data across multiple accounts. With this feature, users can effortlessly maintain a consistent experience across different instances without the need for manual configuration.

Describe alternatives you've considered.

An external program using an API could accomplish similar results.

Additional context

Thank you for considering this feature request. The account sync feature would greatly enhance the user experience on Lemmy by reducing the burden of managing multiple accounts and ensuring a seamless transition across instances.

Related

XtremeOwnageDotCom commented 1 year ago

A bit of a brainfart-

Syncing a user's password wouldn't be very secure, even if it is hashed. As such- that method of syncing wouldn't be a good idea.

HOWEVER, a bit of PKI could fix that. I don't know how authentication works on this project, however, I do know JWT is involved, which means some level of pki.

PKI-based migrations

Lets say, a user creates an account on INSTANCE_1. The account is synced around eventually, and ends up on all of its federated instances.

The user, is allowed to provide and download a private key to their account. Lets say, this attaches a public key, which moves around with their account, wherever it gets federated to.

Lets say, INSTANCE_1 goes down / is unavailable. So, user goes to INSTANCE_2.

Well, since syncing passwords/hashes is not secure- user can't log into their account on instance 2. However, since the user's public key is synced to their account, there is a logon option to migrate their account, and after providing the earlier private key, the user is able to securely authenticate as themselves. Voila, their account is migrated.

Note-

This was just a random brainfart of mine, and may or may not be useful to this topic.

ghost commented 1 year ago

I mean logging into each of the users and selecting to sync with each other once the accounts are created. So the name, password and email may be different.

I think syncing votes would be difficult. How to sync the votes without counting them multiple times? I don't know.

XtremeOwnageDotCom commented 1 year ago

I mean logging into each of the users and selecting to sync with each other once the accounts are created. So the name, password and email may be different.

Ah, understood. I might re-word your request, as ability to export, and import settings / preferences.

jordan1776 commented 1 year ago

Hmm, I think instead of making it necessary to have multiple users to see all of Lemmy, the devs need to make it possible for power users to see all of Lemmy from 1 account if they so choose to. Like blocking interaction with defederated communities is good, but I should still be allowed to see what is on !thatcommunity@thatinstance.ml from a beehaw.org user if I intentionally seeked it out for example, And if I wanted to comment/vote there, then I make a user there. Or even showing "undiscovered" communities in lists. But that is a different issue entirely.

Although import/exporting subscriptions might be a neat feature for sharing lists of communities.

8ullyMaguire commented 1 year ago

Migration tools like Lasim achieve this without the real-time sync aspect:

Related to:

Philipp-M commented 1 year ago

Though, this pretty much copies the account from one to the other instance AFAIU.

A real sync built in core would probably be better/more convenient.

Another thought I consistently have, is that it would quite cool to have a browser extension that manages users for all kinds of lemmy instances (more related to lemmy-ui than lemmy itself I think). It recognizes that the site that's visited is a lemmy(-ui) based site (maybe even generally a fediverse site) and "injects" the actively selected user (where usually would stand Login/Signup, is your user) and possible UI overlays (like up/down vote buttons linked to the logged in instance, which aren't shown when the user is logged out). But I think this is not trivial as it requires quite a little bit of knowledge of the lemmy-ui I think (and needs to be comaintained), but it would IMHO improve the UX quite a bit (just visit a new lemmy-based site and your good to go to interact, if the instance isn't blocked from your instance or vice versa). (Maybe if I find time I'm implementing it, but I'm happy if someone else does it before me)

Nutomic commented 1 year ago

This can be done manually with settings export/import functionality from https://github.com/LemmyNet/lemmy/pull/3976. It can also be easily automated with a script using those endpoints.