How to model context based multitenancy?
What would be the best approach to load the tenant info into the user when working with context base multitenancy?
- If I use
- If I use
Should I define my user resource as?
The context multitenancy docs is not clear how this should be mapped.
Also, if I don't add the attribute id and use
- If I use
global? true I can log in without knowing the tenant, but I'm not sure what the best strategy to fetch the tenant into after - or during - sign in, given the current_user has no tenant data- If I use
global? false I need the tenant info before sign in, which can be work. I just need to figure it out how to build the magic link with the tenant subdomain - probably a phoenix question though.Should I define my user resource as?
The context multitenancy docs is not clear how this should be mapped.
Also, if I don't add the attribute id and use
global? true is there a way to tell ash authentication to load the tenant info it used to log the user in?