Angular 4 : “ Set Cookie ” flag in Http response is not setting Cookie in browser

629 views
Skip to first unread message

nithins...@gmail.com

unread,
Nov 1, 2017, 5:27:53 AM11/1/17
to Angular and AngularJS discussion

I'm working on a Website using Angular 4. We are using Cookie authentication method. After login process API response have cookie in Set Cookie field. But its not setting value in browser. So authentication of other APIs get failed. While using postman its working fine. Following is the Angular code using http get method ( this Api is created for testing purpose.)

this.http.get(
'http://test.xxx.com/test/testjsondata/login', 
{ withCredentials : true}
) 
.map(res => res.json()).
subscribe(data => {   console.log(data); });



Manu Chadha

unread,
May 1, 2018, 12:16:41 PM5/1/18
to Angular and AngularJS discussion
Hi Nitin

Were you able to solve the issue? Iam facing the same problem and am clueless what is going wrong. Would appreciate if you could tell me if and how you solved the problem

thanks
Manu
Reply all
Reply to author
Forward
0 new messages