I wanted to consult the following, I have an application that uses CORS, and I need to obtain the cookie that the ws of the web api return to me. Observing in the browser I see that the cookie goes in the header as Set-Cookie. I already probe with angular ngCookies and it does not work. On the server I use .net with c # and CookieAuthentication from Owin.
Any other option?
this._$http.post('http://webapi:50830'+Utiles.prefijoApi(this._subscriptor) + 'cuenta/login', JSON.stringify(dto))
.then(function (resultado) {
var a = this._$cookies.get('Token');
return resultado.data;
}.bind(this), function (error) {
return this._$q.reject(error.data);
}.bind(this));
EDITING
Resolved the problem with the $ httpProvider.defaults.withCredentials = true; and it works correctly for requests to the WebApi. Now, I have the same problem with requests to MVC controllers, and I can not find a way to solve it, any ideas ??