MIKE
MIKE

Reputation: 1059

Use cookie authentication in mvc5 project with web api controller

We have an application in production built in mvc5 with cookie authentication. We added a component to this project that uses web api controller. When a logged in user tries to access the part of the system that uses web api the controller is asking them to sign in again. Is there a way to make web api use the same cookie authentication as the mvc controllers?

Upvotes: 0

Views: 802

Answers (1)

dan
dan

Reputation: 532

You cannot authenticate WebApi by the use of cookies. If you want to a secured WebApi you should implement your access token generation.

Upvotes: 1

Related Questions