I basically need to allow for the sharing of usernames amongst users, however they must be distinct inside a tenant. I also want to use third-party sign-ins like Twitter, Microsoft, Facebook, and Google.
The framework does appear to allow expansion, but as far as I can tell, multi-tenancy was not considered when it was built. Although I'd want to use as many pre-existing components as I can, I currently believe I will have to forgo the Enterprise Framework implementation and write all of the code from scratch.
Has anyone else attempted this, and how much of the coding was done by them?
Currently, I have a functional fix, which I've provided in a GitHub repository:
The 1.0.0 release of Microsoft.AspNet.Identity.EntityFramework does not have the extensibility needed to allow multi-tenancy (at least not without a lot of special effort), but the 1.1 alpha release, which is now accessible through the NuGet packages for the nightly ASP.NET Web Stack, does.
Two straightforward sites that utilize the package to support multi-tenancy are offered by me:
As soon as ASP.NET Identity version 1.1 is made available, I want to update the solution.
I sincerely hope that others may find some use for the nuget package I've made available; any input is greatly appreciated.
Now that Microsoft.AspNet.Identity.EntityFramework 2.0 has been released, the solution has been changed to use it.
Yes, we left this as an extensibility case on purpose. This should be possible by creating your own unique IUserStore and overriding UserManager attributes. However, you might be able to just add a tenantId to your user and extend the EF UserStore.