Is possible to use cookie based authentication with ASP.NET Web API and SPA?

前端 未结 1 671
深忆病人
深忆病人 2021-02-07 10:14

I want to create the web application which will be based on angularjs frontend and ASP.NET Web API. I need create the secure api but I can\'t use the token based authentication

1条回答
  •  生来不讨喜
    2021-02-07 10:47

    The TokenBased Authentication is currently used in SPA based on BackEnd API applications is to overcome the limitation of cookiebased authentication But since you have decided to go with it then you can use OWIN cookieAuthentication middleware which will do the needful. Here's an article showing how to configure the OWIN cookie authentication middleware in Asp.net project(No matter if it's WebApi or MVC application).

    0 讨论(0)
提交回复
热议问题