Have you got any ideas why I get an error
SyntaxError: JSON.parse: unexpected character
on this code
console.log($cookieStore.get('XSRF-TOKEN'));
the cookie value is
kscJcqrDYSMdZtBleuq8yUrB
?
var currentSession = req.session.passport;
var user = currentSession.user;
res.cookie('USER',JSON.stringify(user) , { maxAge: 900000, httpOnly: false});
$cookieStore is serialized session storage. It gives you error because value of cookie are not serialized.
You need $cookies for your value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With