Reputation: 391
I'm developing a website which includes a log-in to customers and sellers ,so the users & sellers can log-in and maintain their profiles. I created the Mvc project by selecting "No authentication".But now i need to add authentication to my project.I followed the database first approach to create the model.So i have the table called "User" to store information about users.Can i do the authentication using that table?(It includes Id,Email,Password,etc).If yes, How do i do that? What are the packages i need to install? what are the modifications i need to do in web.config file?(I saw something related to this in a tutorial)
I also need to restrict various services(pages) to users by using authorizing.For a example if the user is a seller he/she will be able to edit their product details,but not the customers..Please suggest me a way to do this.
Upvotes: 1
Views: 6045
Reputation: 3878
You can do this with minimal coding using ASP.NET identity which provides the Authentication and Authorization out of the box. Below article by Ben Foster can help you with that.
Upvotes: 4