The following code describes my middleware to handle the login requests into my portal. On successful password validation, it sets the 'Set-Cookie' header to the response and responds back with HTTP Status Code 200.
Snapshot of the response from the server side is attached here. It's absolutely perfect.
However, the XSRF-TOKEN is not being set as a cookie in the user agent.
I am using AngularJS 1.6.9 on the front-end and I need this cookie set in my browser for subsequent requests.
My Back-End is powered by Express. It is hereby an earnest request to let me know what exactly I'm doing wrong! Thanks in advance.
Can anyone please help me in setting my session cookie to the user agent?