I Implemented a AngularJS Project, Service Side implementation I used the .NET WEB API. For Authorization I'm using
FormsAuthentication.SetAuthCookie(token, false);
It's coming fine in browser Cookies.
But I can't able to get the cookies in JavaScript
Kindly assist me, why It's coming empty ?
The reason for this is that .MDAUTH
cookie is set as HttpOnly
. This means only the server side will be able to access the cookie and not the client side. You need to explicitly set HttpOnly
to false
while setting the cookie in the backend.