Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(UX): multi-tab experience #26309

Merged
merged 1 commit into from
May 3, 2024
Merged

fix(UX): multi-tab experience #26309

merged 1 commit into from
May 3, 2024

Conversation

ankush
Copy link
Member

@ankush ankush commented May 3, 2024

image

If you get this error often, it's most likely because:

  1. You have multiple tabs open
  2. You get logged out in one tab and you login.
  3. Other tabs don't know that this has happened.
  4. Browser sends new SID cookie correctly but it has no way of knowing new CSRF token.
  5. Problem auto resolves if you reload page.

Fix:

  1. On booting new session update other tabs/workers in same browser to avoid "invalid requests".
  2. On logging in as diff user - notify user to reload page.

Not going to force reload to avoid potential data loss.

Ref: https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel

- On booting new session update other sessions in same browser to avoid
  "invalid requests"
- On logging in as diff user - notify user to reload page.

Not going to force reload to avoid potential data loss.
@ankush ankush requested review from a team and akhilnarang and removed request for a team May 3, 2024 11:02
@ankush ankush added the defer backport Backports for some PR are deferred for a week or two to test them properly before releasing label May 3, 2024
@ankush ankush merged commit 0929c23 into frappe:develop May 3, 2024
25 checks passed
@ankush ankush deleted the multi_tab_ux branch May 3, 2024 11:22
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 19, 2024
@ankush ankush added backport version-15-hotfix Backport the PR to v15 and removed defer backport Backports for some PR are deferred for a week or two to test them properly before releasing labels Jun 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-15-hotfix Backport the PR to v15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant