How should I handle authorization / authentication in my Asp.net MVC application?

I am creating an Asp.net MVC application, and currently I'm using the built-in authentication / authorization code that comes with the MVC sample application. For the most part, this works fine, and I understand what is happening.

As for me, this is what I now want, as it were, for my users to be stored in two different tables in two databases. that is, I have users in my application database that represent the "Client" object in the application, as well as the "User" in the authentication database that was used to log into the application.

Should I take the value of the user User.Identity.Name to log in and look in the table of my clients or should I combine them into one table? What is the best way to handle this?

Please forgive my ignorance - this is the first time I work with such a system.

Any feedback is greatly appreciated!

+5
source share
2 answers

It’s useful to come up with credentials and records that bind a person to application data as two very different things. Depending on the application, your Client does not have credentials to log into the system or you may have an administrative user who logs into the system but is not associated with your application data.

, .

, .

+4

.Net Memberhip Provider, , .

. ASP.net - ?

ASP.NET

+2

All Articles