Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

I have a Onion architecture based Asp.net MVC-5 web application without login integration with below details-

Database - MySql
Entity framework Approaches - Database First
Architecture- Onion architecture
.Net Framework - 4.6.1

Now i wants to add Web API project for mobile app. till now i have not any issue..

Issue is exactly.. How can i implement central Asp.net Identity membership system for both Web App and Web Api projects as well as Slit it based on Onion Architecture. Please help...

What I have tried:

I am new for web plate-form and needs your guidance so i have not tried much more..
Posted
Updated 26-Sep-19 20:02pm
Comments
dnxit 19-Sep-19 3:51am    
You can add web api controllers in same mvc application, check this link if you go with this approach
https://satvasolutions.com/combine-asp-net-identity-web-api-and-mvc-single-web-app/

1 solution

To maintain the separation of concerns, you'll probably want to make your Onion stack the Web API instead of the MVC 5. Your MVC 5 will be a separate UI only app that calls your Web API, your mobile app also calls your Web API. The most likely solution you will need for Asp Identity is to use JWT Tokens, then both your MVC 5 and mobile app can use a token (MVC 5 stores in cookie and mobile app using internal storage).
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900