Out of curiosity, why are cookies preferred to local storage ?
For web browsers, cookie-based auth solves a ton of browser-specific problems that history has spent a long time building up answers for.
Also note that the cookies should be http only and with the secure flag