WIP: feat: account switching #279

Draft
nbsp wants to merge 1 commits from nbsp/pleroma-fe:feat/account-switching into develop
Contributor

disclaimer this is ass

this is just a proof of concept and it sucks and is garbage and very much a wip with broken parts literally everywhere i'll get to that


this PR implements multiple account support in the frontend, and account switching. for people who have two accounts on the same instance but don't want to use two firefox containers.

  • store keys of multiple accounts
  • clear notifs/timelines/friends when logging in to a new user or switching users
  • log back to the other account if logging out with 2+ accounts
  • replace every instance of getToken to expect an object, and not just a string
  • load the friends timeline when switching to an account
  • deal with the switcher erroring if not every user is loaded
  • get rid of the 2s where it looks like you're logged out
  • implement the register button
  • make this work without erasing cookies
  • make the code not FLAMING HOT ASS GARBAGE
# disclaimer this is ass this is just a proof of concept and it sucks and is garbage and very much a wip with broken parts literally everywhere i'll get to that <hr /> this PR implements multiple account support in the frontend, and account switching. for people who have two accounts on the same instance but don't want to use two firefox containers. - [x] store keys of multiple accounts - [x] clear notifs/timelines/friends when logging in to a new user or switching users - [x] log back to the other account if logging out with 2+ accounts - [ ] replace every instance of getToken to expect an object, and not just a string - [ ] load the friends timeline when switching to an account - [ ] deal with the switcher erroring if not every user is loaded - [ ] get rid of the 2s where it looks like you're logged out - [ ] implement the register button - [ ] make this work without erasing cookies - [ ] make the code not *FLAMING HOT ASS GARBAGE*
nbsp added 1 commit 2023-02-07 16:43:38 +00:00
ci/woodpecker/pr/woodpecker Pipeline was successful Details
22fdb50d88
feat: account switching

ok yeah but like find and deal with it automatically instead of asking everyone to clear cookies when updating to this version

ok yeah but like find and deal with it automatically instead of asking everyone to clear cookies when updating to this version
Author
Contributor

ok yeah but like find and deal with it automatically instead of asking everyone to clear cookies when updating to this version

ok yeah but like find and deal with it automatically instead of asking everyone to clear cookies when updating to this version
Author
Contributor

what the fuck did i do with that comment im dumb im gonna have cofe

what the fuck did i do with that comment im dumb im gonna have cofe

i would advise against doing this as a whole

pleroma-fe was built as a single-account client and does not even use oauth most of the time

i would advise against doing this as a whole pleroma-fe was built as a single-account client and does not even use oauth most of the time

additionally, the content security policy disallows it connecting to remote instances, massively limiting the usefulness even if this did work

additionally, the content security policy disallows it connecting to remote instances, massively limiting the usefulness even if this did work
Author
Contributor

does not even use oauth most of the time

it doesn't, no, but that only makes the implementation easier, it seems
as long as you store all of the keys you can act as all accounts without constantly needing to figure out which account you are

additionally, the content security policy disallows it connecting to remote instances, massively limiting the usefulness even if this did work

meh, misskey has this and it's been a genuinely useful feature for bots and such

> does not even use oauth most of the time it doesn't, no, but that only makes the implementation easier, it seems as long as you store all of the keys you can act as all accounts without constantly needing to figure out which account you are > additionally, the content security policy disallows it connecting to remote instances, massively limiting the usefulness even if this did work meh, misskey has this and it's been a genuinely useful feature for bots and such
Author
Contributor

i mean i'm fine with not doing this it's a niche and it does add a lot of complexity

i mean i'm fine with not doing this it's a niche and it does add a lot of complexity
First-time contributor

@sfr I think this would be a good change even if just for an instance admin, or you want to manage a few accounts like a bot account, a main, a close friends only vent account etc in a convenient manner. It doesn't have to support external accounts, even just as something for only local accounts it's a good change.

Currently I do it with firefox containers (one for each account) but it's honestly really inconvenient.

@sfr I think this would be a good change even if just for an instance admin, or you want to manage a few accounts like a bot account, a main, a close friends only vent account etc in a convenient manner. It doesn't have to support external accounts, even just as something for only local accounts it's a good change. Currently I do it with firefox containers (one for each account) but it's honestly really inconvenient.
Mergan added the
WIP
Feature
labels 2023-03-15 21:15:19 +00:00
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
Sign in to join this conversation.
No description provided.