ASP.NET Core Identity is not multi tenant and presents a few challenges if you wish to make it so.
The two that I came across that I had to solve were:
- Cookies - I had to use a cookie manager to ensure that the cookies for different tenants were different.
- LoginExpireMinutes - this could only be set in the startup classes and I had to alter my cookie manager to do this dynamically as different tenants required different login expire minutes.
I am using Cookies, not sure if ASP.NET Core Identity can be used with JWT tokens or not (i.e. without identityserver4) and if this would make things any simpler or not.
Hope this helps someone.