You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm implementing a multi-tenant app where each tenant has its own database, and sessions should also be split between each database. I've written a custom session store, but as I am passing the tenant ID as a path parameter, the session store has no way to determine which database to use. For now, I have to basically re-implement sessions.
The text was updated successfully, but these errors were encountered:
I actually found a different way around this than re-implementing sessions. What I did was when returning the token to the user on login, I formatted the token to include the tenant ID, and then in my session store's read method parsed it out. Then I also similarly serialized the user ID to include both the user ID and tenant ID, so that I could access it for save, update, and fetchUser operations. It's still a bit hacky and it would probably still be ideal to provide extra request-time data directly, but this is at least doable.
I'm implementing a multi-tenant app where each tenant has its own database, and sessions should also be split between each database. I've written a custom session store, but as I am passing the tenant ID as a path parameter, the session store has no way to determine which database to use. For now, I have to basically re-implement sessions.
The text was updated successfully, but these errors were encountered: