Posted on 22/04/2024 14:23:51
Hi Adrian,
We've been solving for this, but not in an elegant way, so I can't give you our exact code. It also comes with some complexity on the simpler scenarios.
It's a long story to explain, but here's what we believe the end-result could be on those cases:
- There's a user (aka Login) with username = "adrian.juell@domain.com"
- The user can impersonate one of more users (aka Accounts), for example
- "adrian.juell@customer1.com" OR "Customer00321@customer1"
- "adrian.juell@customer2.com" OR "Customer00697@customer2"
- ...
- You only login with user "adrian.juell@domain.com"
- But then you must manage/impersonate one of your Accounts (specific to those customers)
Once setup, it's simple enough to develop the customization in Invite User to create a new "Account" on the customer and set the impersonation.
The problem is refactoring the data when you start with a single Account to 2 Accounts to manage (when you need to create the Login, move the password to it), so that the older User ID (tied to the first user) keeps all if it's stats, favorites, saved cards and whatnot. The user will also have to know they will have a brand new UX the next time they login. Because now you "should" enforce them to pick an account to manage.
OR you make this whole thing simpler and tell them this is not possible and they must have 1 unique email per customer. It's how thousands of other platforms do it. Sure keeps complexity and costs down, but I also know that allowing this to happen is perceived as a differentiating factor by some customers.
Let me know if I can help more,
Nuno