B
B
babaevmm2016-10-17 15:12:47
ASP.NET
babaevmm, 2016-10-17 15:12:47

How to make friends mvc and web api in one project?

Hello!
The task is to make a website with api services. Worked with MVC. WEB API studied like. I wanted to use token-based authentication (bias on api in general). But having reached the implementation of the authentication and authorization system itself (ASP Identity), I realized that not everything is so simple - there is no simple way out of the account based on tokens (correct if wrong).
Question: what is the best way to implement such a combination?
After all, basically for MVC, authorization is based on cookies. It is planned that the API will be available according to the rights.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2016-10-18
@babaevmm

Create a new ASP.Net project, select the SPA template, specify individual accounts, and there you will automatically get authorization for MVC and WebAPI and Bearer token.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question