3

So here's my situation:

I'm building a web application using .NET Core and React.js. I'm asking what would be the best authentification methods/strategies for my users. In the past, I used Identity in MVC.NET apps to generate Identity table and handle auth and roles, but this time I also want to use a NoSQL database type for hight scalability purpose.

Any thought on the strategy I should use? Is using a polyglot persistence strategy is the way to go? Identity on SQL server and other data on NoSQL?

iPeo
  • 399
  • 2
  • 7
  • 16
  • There's no *best* way, at least in terms of database access, since it's your app accessing the database, not the users. And polyglot persistence is just the idea of using multiple databases within your app. Nothing really related to identity membership. Is there an issue using the tables you already have, for auth/identity management? – David Makogon Jul 17 '17 at 13:44
  • Technically no, there's none. But i'm wondering if i'm on the best path. Would this be a good solution to split data this way? Is there better options than Identity for .NEt Core, like open ID and token based auth? – iPeo Jul 17 '17 at 14:12

2 Answers2

2

The Simplest way is to use and extend an existing solution for ASP.net Membership provider on cosmos db , one of them can be found here: https://github.com/tracker086/DocumentDB.AspNet.Identity

And here you can find a step by step tutorial how to connect everything together: https://varunrathore.wordpress.com/2016/04/27/asp-net-identity-using-azure-documentdb/

OBender
  • 2,492
  • 2
  • 20
  • 33
1

So I gave it some thought and I think I'll go with Identity as a service, with something la IdentityServer4 or Azure AD for B2C. This clearly divides both concerns in 2 different projects/services. Will see how it goes.

iPeo
  • 399
  • 2
  • 7
  • 16
  • How did it go? :) – oatsoda Jan 20 '20 at 09:20
  • @oatsoda Sorry just saw your comment. Went with Identity Server 4 in 3 different projects actually. Went great! But thinking about switching to Azure B2C because of license changes. – iPeo Mar 10 '22 at 19:14