I need to use http only cookies in electron, but they are disabled, does anyone know how to enable?
I need to use http only cookies in electron, but they are disabled, does anyone know how to enable?
The renderer environment of Electron does not currently have support for the document.cookie
API. Therefore, libraries such as Google Analytics or similar that use client-side cookies will not work because they can not set cookies.
To work around this problem you can use package electron-cookies
.
Installation
npm install electron-cookies
Use
In the renderer code of your solution, simply specify the package:
require('electron-cookies')
Your cookies will then be stored in localStorage
.
Source: link