Add tab scoped multi-session support #1732

Open
opened 2026-03-13 08:59:15 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @bnssoftware on GitHub (Aug 18, 2025).

Is this suited for github?

  • Yes, this is suited for github

No response

Describe the solution you'd like

The current multi-session support switches all tabs to the selected session. It would be nice to implement an optional feature to allow sessions scoped per tab similar to the way Google does it. For example, when using GMail, the first account you log into gets a url path of /u/0 then when you switch accounts, it opens another tab with the next number such as /u/1, etc. So you end up with a url such as mydomain.com/u/0/some-page in one tab for User 1 and mydomain.com/u/1/some-page in tab two for User 2, etc. This seems to get around the fact that tabs all share the same browser storage so it provides some sort of logical separation of session storage per tab.

Describe alternatives you've considered

Haven't tried any yet.

Additional context

No response

Originally created by @bnssoftware on GitHub (Aug 18, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. _No response_ ### Describe the solution you'd like The current multi-session support switches all tabs to the selected session. It would be nice to implement an optional feature to allow sessions scoped per tab similar to the way Google does it. For example, when using GMail, the first account you log into gets a url path of /u/0 then when you switch accounts, it opens another tab with the next number such as /u/1, etc. So you end up with a url such as mydomain.com/u/0/some-page in one tab for User 1 and mydomain.com/u/1/some-page in tab two for User 2, etc. This seems to get around the fact that tabs all share the same browser storage so it provides some sort of logical separation of session storage per tab. ### Describe alternatives you've considered Haven't tried any yet. ### Additional context _No response_
GiteaMirror added the enhancement label 2026-03-13 08:59:15 -05:00
Author
Owner

@widavies commented on GitHub (Aug 31, 2025):

+1 - Would be useful, probably means cookies need to be overhauled a bit so that each cookie for each account is set to the server and the server uses a query parameter to select the active cookie.

@widavies commented on GitHub (Aug 31, 2025): +1 - Would be useful, probably means cookies need to be overhauled a bit so that each cookie for each account is set to the server and the server uses a query parameter to select the active cookie.
Author
Owner

@bnssoftware commented on GitHub (Nov 4, 2025):

any update on this?

@bnssoftware commented on GitHub (Nov 4, 2025): any update on this?
Author
Owner

@better-auth-agent[bot] commented on GitHub (Nov 4, 2025):

(tag @better-auth-agent) Hi there! Thank you for the question. Currently, there isn’t an update on implementing tab scoped multi-session support—this remains an open feature request for us. If you'd like to help move this forward, please consider adding more details about your use case or any specific challenges you’re encountering. In the meantime, could you share how you envision this feature integrating with your current workflow? tag @better-auth-agent

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Nov 4, 2025): (tag @better-auth-agent) Hi there! Thank you for the question. Currently, there isn’t an update on implementing tab scoped multi-session support—this remains an open feature request for us. If you'd like to help move this forward, please consider adding more details about your use case or any specific challenges you’re encountering. In the meantime, could you share how you envision this feature integrating with your current workflow? tag @better-auth-agent <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@dosubot[bot] commented on GitHub (Feb 3, 2026):

Hi, @bnssoftware. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested an optional feature for tab-scoped multi-session support to allow separate sessions per browser tab, similar to Google's account switching.
  • A contributor supported the idea but noted it might require changes to cookie management.
  • You expressed continued interest in updates regarding this feature.
  • A maintainer acknowledged the request but indicated no current progress and asked for more use case details.
  • The issue remains open without an implemented solution.

Next Steps:

  • Please let me know if this feature is still relevant to the latest version of better-auth by commenting on this issue.
  • If I do not hear from you within 7 days, this issue will be automatically closed.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 3, 2026): Hi, @bnssoftware. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested an optional feature for tab-scoped multi-session support to allow separate sessions per browser tab, similar to Google's account switching. - A contributor supported the idea but noted it might require changes to cookie management. - You expressed continued interest in updates regarding this feature. - A maintainer acknowledged the request but indicated no current progress and asked for more use case details. - The issue remains open without an implemented solution. **Next Steps:** - Please let me know if this feature is still relevant to the latest version of better-auth by commenting on this issue. - If I do not hear from you within 7 days, this issue will be automatically closed. Thank you for your understanding and contribution!
Author
Owner

@kbrgl commented on GitHub (Feb 3, 2026):

This is still relevant! It's useful in use cases where e.g. a user wants to be signed into their work account in one tab and their personal in another, which happens more frequently than you might think.

@kbrgl commented on GitHub (Feb 3, 2026): This is still relevant! It's useful in use cases where e.g. a user wants to be signed into their work account in one tab and their personal in another, which happens more frequently than you might think.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1732