After some research i got fix to my problem. As in my code i am commenting the httpOnly:true
which by default is true
. so i have to define this as false
not removing it from my code.
This works for me:
cookie:{
httpOnly:false,
secure:true
}