I've created an empty asp.net mvc5 project, used EF with code first approach. How can I add OWIN authentication and store Users and Roles in my created database? How can I customize OWIN authentication for my purpose?
            Asked
            
        
        
            Active
            
        
            Viewed 1,046 times
        
    1
            
            
        - 
                    Maybe my question is not clear enough. I try to explain. In my asp.net mvc5 empty project I used EF which generated DB for me.I want to add authentication functionality into my project. I read many articles how to work with Identity, but in all samples explained how to use local db and not existing db. I want to store information about Users in my existing DB not in local db. How – Yuliaalexa Yuliaalexa Aug 08 '15 at 09:34
 - 
                    I don't know why down vote this question, I have similar issues. – pojomx Oct 16 '15 at 16:49
 - 
                    I think your question is very valid. You can find some useful information in the link below, like adding the relevant NuGet packages and a script for creating the needed tables: http://stackoverflow.com/questions/31960433/adding-asp-net-mvc5-identity-authentication-to-an-existing-project – AH. May 10 '16 at 16:13
 
2 Answers
0
            
            
        Look into Microsoft's Identity framework. You can the Nuget package Identity EntityFramework to your project.
        ryano.mcc13
        
- 474
 - 4
 - 10
 
0
            
            
        A good guide to setup a token based authentication: http://bitoftech.net/2014/06/01/token-based-authentication-asp-net-web-api-2-owin-asp-net-identity/
        Cheezd
        
- 44
 - 1
 
- 
                    Hello and welcome to Stack Overflow! Please avoid link only answers. While providing references is encouraged, please summarise the relevant parts of the link in your answers. – Anders Aug 07 '15 at 22:09