I am trying to implement an authentication system and I've run into some problems and after a lot of troubleshooting I've come to realise that I don't fully understand the difference between theese three:
res.cookie(name, value, [options])
and
res.setHeader('Set-Cookie')
and
Cookies.set(name, value, [options]) //js-cookie npm package