-
We try to provide a convient method to log in to tenants by providing a form on the default tenant that accepts credentials. We then lookup the corresponding tenant (by email address) and do something like this (simplified, removed validation code etc):
On first glance, this seems to work perfectly and we´re like "what a great platform" again. But then we encounter issues. The most easy to reproduce is that a user just cant logout. We try:
But it has no impact. Maybe the entire approach is fundamentally wrong, but it felt right and seemed to work. Now we are somewhat lost.. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Take a look at the code of our Tenants Admin Login module for inspiration. You'll need to log in the user in an HTTP request made to the destination tenant. |
Beta Was this translation helpful? Give feedback.
-
Ended up doing it very similar, thanks for your reply! We validate the user within the tenant scope, return a cookie to the client and then redirect to the destination tenant, which grabs that cookie to sign in. It works flawlessly this way now |
Beta Was this translation helpful? Give feedback.
Take a look at the code of our Tenants Admin Login module for inspiration. You'll need to log in the user in an HTTP request made to the destination tenant.