Problem
A User logs in to an app and receive a cookie. They then login to a different app and receive a different cookie. They can no longer continue their first session.
Underlying issue
The Homeserver handles multiple sessions per user no problem. The issue is in fact that the Cookie name is the user id, so the managing application (browser in this case) overwrites the first cookie.
Solution
So we have a few options:
- Make Cookie name unique
- Browsers use a
name+domain+path combination for uniqueness. We could ensure that Apps request cookies for only the path they need. This would mean one cookie per root and one per app. So only one app can access pubky.app at a time.