[GH-ISSUE #1165] Use chrome-cookies-secure to share cookies between user Chrome and Hoarder puppeteer #761

Closed
opened 2026-03-02 11:52:31 +03:00 by kerem · 3 comments
Owner

Originally created by @maelp on GitHub (Mar 26, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1165

You can use https://github.com/bertrandom/chrome-cookies-secure to share cookies and avoid the "accept cookies" screen and be logged in to some user websites in the Hoarder instance

It works this way

    const cookies = await chrome.getCookiesPromised(
      url,
      "puppeteer",
      "default",
    );

    const browser = await puppeteer.launch({
      headless: true,
    });
    const page = await browser.newPage();
    await page.setCookie(...cookies);

We could also imagine having a VNC software to connect to the puppeteer backend and let the user login to some website?

eg. https://github.com/franciskim/docker-ubuntu-novnc-puppeteer or https://github.com/m1k1o/neko

Originally created by @maelp on GitHub (Mar 26, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/1165 You can use https://github.com/bertrandom/chrome-cookies-secure to share cookies and avoid the "accept cookies" screen and be logged in to some user websites in the Hoarder instance It works this way ```typescript const cookies = await chrome.getCookiesPromised( url, "puppeteer", "default", ); const browser = await puppeteer.launch({ headless: true, }); const page = await browser.newPage(); await page.setCookie(...cookies); ``` We could also imagine having a VNC software to connect to the puppeteer backend and let the user login to some website? eg. https://github.com/franciskim/docker-ubuntu-novnc-puppeteer or https://github.com/m1k1o/neko
kerem closed this issue 2026-03-02 11:52:31 +03:00
Author
Owner

@maelp commented on GitHub (Mar 26, 2025):

Note that an easier way might be to just add a "share cookies for this tab with backend" feature on the Chrome extension, see https://github.com/hoarder-app/hoarder/issues/1167

<!-- gh-comment-id:2753679303 --> @maelp commented on GitHub (Mar 26, 2025): Note that an easier way might be to just add a "share cookies for this tab with backend" feature on the Chrome extension, see https://github.com/hoarder-app/hoarder/issues/1167
Author
Owner

@MohamedBassem commented on GitHub (Mar 29, 2025):

Not a big fan of letting hoarder extract user cookies honestly. The VNC solution is more acceptable approch, but integrating singleFile in hoarder's extension is probably the simplest.

<!-- gh-comment-id:2763732800 --> @MohamedBassem commented on GitHub (Mar 29, 2025): Not a big fan of letting hoarder extract user cookies honestly. The VNC solution is more acceptable approch, but integrating singleFile in hoarder's extension is probably the simplest.
Author
Owner

@maelp commented on GitHub (Mar 29, 2025):

Agreed that conceptually it could be sensitive (although if hoarder is self-hosted it's not a big deal), it might be better that the Hoarder extension does the same as SingleFile, and then uploads to the backend

But it doesn't solve the issue for "video" or very large website, where the extension won't be able to load and push to the backend

So I guess we still need either a VNC + logging, or tranferring cookies (which is equivalent, since at the end of both options, the user cookies for that website will be on the backend)

<!-- gh-comment-id:2763836953 --> @maelp commented on GitHub (Mar 29, 2025): Agreed that conceptually it could be sensitive (although if hoarder is self-hosted it's not a big deal), it might be better that the Hoarder extension does the same as SingleFile, and then uploads to the backend But it doesn't solve the issue for "video" or very large website, where the extension won't be able to load and push to the backend So I guess we still need either a VNC + logging, or tranferring cookies (which is equivalent, since at the end of both options, the user cookies for that website will be on the backend)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#761
No description provided.