ElectronJs: How to get the data of cookie in BrowserWindow that made in main process
<p>I am creating a cookie in app.js</p>

<pre><code>/// cookies test
const session = require('electron').session;
const ses = session.fromPartition('persist:name');

debugger;
// Query all cookies associated with a specific url.
ses.cookies.get({}, (error, cookies) =&gt; {
    debugger;

    console.log(cookies); /// cookies values should be printed next time the applciation is launched.
});

// Set a cookie with the given cookie data;
// may overwrite equivalent cookies if they exist.
const cookie = {
    url: 'http://www.github.com',
    name: 'dummy_name',
    value: 'dummy',
    expirationDate: 2093792393999
};
ses.cookies.set(cookie, (error) =&gt; {
    debugger;

    if (error)
        console.error(error);

    ses.cookies.get({}, (error, cookies) =&gt; {
        console.log(cookies); /// cookies values should be printed next time the applciation is launched.
    });
});
</code></pre>

<p>I need to access the data of cookie into rendered process. how to do it?</p>