Reload when auth token mismatch is detected #6897

Merged
infinite-persistence merged 1 commit from ip/prevent.wallet.merge into master 2021-08-18 16:49:10 +02:00
infinite-persistence commented 2021-08-18 07:20:50 +02:00 (Migrated from github.com)

Tickets

Steps to replicate

  1. Login to odysee with account-A.
  2. Open another tab, and split both tabs on the screen.
  3. Logout from the 1st tab. Do not activate (focus) the 2nd tab.
  4. On the 1st tab, login with account-B.
  5. Activate (focus) the 2nd tab. The wallet would have been merged, and we are still logged in as account-A.

Approach

Reload when the LBRY API token no longer matches the auth token.

Concerns

  • Will there be valid scenarios where the API token can be different?
## Tickets - Closes [#5504 Signing out of account causes page to break in other tabs](https://github.com/lbryio/lbry-desktop/issues/5504) - Closes [#6829 merged accounts - force log out / fail sync when x-auth-token and cookie auth token are different](https://github.com/lbryio/lbry-desktop/issues/6829) ## Steps to replicate 1. Login to odysee with account-A. 2. Open another tab, and split both tabs on the screen. 3. Logout from the 1st tab. Do not activate (focus) the 2nd tab. 4. On the 1st tab, login with account-B. 5. Activate (focus) the 2nd tab. The wallet would have been merged, and we are still logged in as account-A. ## Approach Reload when the LBRY API token no longer matches the auth token. ## Concerns - Will there be valid scenarios where the API token can be different?
tzarebczan (Migrated from github.com) reviewed 2021-08-18 07:20:50 +02:00
tzarebczan commented 2021-08-18 16:47:27 +02:00 (Migrated from github.com)

Thanks @infinite-persistence. There should be no scenario where these two are different.

Thanks @infinite-persistence. There should be no scenario where these two are different.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#6897
No description provided.