bluesky-social / social-app

The Bluesky Social application for Web, iOS, and Android
https://bsky.app
MIT License
10.11k stars 1.29k forks source link

Web app auto logs out while using when switching tabs #702

Open AshleyYakeley opened 1 year ago

AshleyYakeley commented 1 year ago

To Reproduce:

  1. Open up a second browser tab with Bluesky
  2. Keep using Bluesky in one tab
  3. After some period of time (six hours? 24 hours?), switch to the other tab

Result: unexpectedly auto logged out in both tabs

Expected: to keep using the app

Platform: https://staging.bsky.app/ on Firefox on Linux

Note this happens quite often to me as I often leave multiple Bluesky tabs open. As soon as I switch to an old one, I get logged out in all of them.

pfrazee commented 1 year ago

Yeah to solve this we need to use broadcastchannels and/or localstorage to coordinate session tokens between the tabs

AshleyYakeley commented 1 year ago

Could you just not automatically log out? Twitter, Facebook, Tumblr, Instagram, Reddit, etc., do not automatically log out.

psavan1655 commented 1 year ago

For that we need to implement different in-browser storage. As opposed to current storage, which gets cleared out on exiting from a tab. I will be happy to work on this issue.

mschwendener commented 1 year ago

unexpectedly auto logged out in both tabs

Not only that: when I log in again in one browser tab, and reload the other tab, that's not enough – I'm still logged out in the other tab (Chrome on Mac).

Edit to be more precise: I opened many tabs yesterday with accounts I wanted to look at (and maybe follow) today, coming from a thread I liked.

The log out happened like described.

I logged in again in one tab – now, when I open any of the tabs from yesterday, I see the page for a short moment (browser cache), and then I get logged out.

Zero3K commented 1 year ago

Any news regarding this bug? I am now experiencing it after the upgrade to 1.47.