feat: Add chromiumBrowser option to target specific Chromium browser on macOS#2
Open
ainergiz wants to merge 1 commit intosteipete:mainfrom
Open
feat: Add chromiumBrowser option to target specific Chromium browser on macOS#2ainergiz wants to merge 1 commit intosteipete:mainfrom
ainergiz wants to merge 1 commit intosteipete:mainfrom
Conversation
…on macOS
Adds `chromiumBrowser` option to specify which Chromium-based browser to target
on macOS (chrome, brave, arc, chromium).
When using `browsers: ['chrome']` on macOS with multiple Chromium browsers
installed, sweet-cookie tries each browser's keychain entry sequentially,
causing multiple password prompts.
The new `chromiumBrowser` option lets callers specify exactly which browser
to target, resulting in a single keychain prompt:
```typescript
const { cookies } = await getCookies({
url: 'https://example.com',
browsers: ['chrome'],
chromiumBrowser: 'brave', // Only try Brave's keychain entry
});
```
This is backwards compatible - when omitted, behavior is unchanged.
Closes steipete#1
This was referenced Jan 3, 2026
ainergiz
added a commit
to ainergiz/xfeed
that referenced
this pull request
Jan 3, 2026
The npm version of sweet-cookie doesn't have the chromiumBrowser option yet (awaiting upstream PR steipete/sweet-cookie#2). Without it, selecting Brave/Arc prompts for Chrome's keychain instead of the correct one. This vendored version includes the chromiumBrowser option, which tells sweet-cookie which specific Chromium browser's keychain to use for cookie decryption. Once the upstream PR is merged and published, we can switch back to npm. Fixes #100 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ainergiz
added a commit
to ainergiz/xfeed
that referenced
this pull request
Jan 3, 2026
) * fix(auth): Support Brave, Arc, and Opera browser cookie extraction Pass explicit cookie database paths when source is Brave, Arc, or Opera, so sweet-cookie only accesses that browser's keychain entry. This ensures a single password prompt instead of multiple prompts for different Chromium browsers. This is a workaround until steipete/sweet-cookie#1 adds the chromiumBrowser option. See #100 for tracking. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(auth): Use vendored sweet-cookie with chromiumBrowser support The npm version of sweet-cookie doesn't have the chromiumBrowser option yet (awaiting upstream PR steipete/sweet-cookie#2). Without it, selecting Brave/Arc prompts for Chrome's keychain instead of the correct one. This vendored version includes the chromiumBrowser option, which tells sweet-cookie which specific Chromium browser's keychain to use for cookie decryption. Once the upstream PR is merged and published, we can switch back to npm. Fixes #100 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
chromiumBrowseroption to specify which Chromium-based browser to target on macOS (Chrome, Brave, Arc, or generic Chromium). This avoids triggering multiple macOS keychain prompts when multiple Chromium browsers are installed.Changes
chromiumBrowser?: 'chrome' | 'brave' | 'arc' | 'chromium'toGetCookiesOptionsgetCookiesFromChrome()inpublic.tschrome.tsprovider already supports this via its optionsUse Case
When a user knows they want cookies from Brave specifically, they can set
chromiumBrowser: 'brave'to avoid keychain prompts for Chrome, Arc, etc.Closes #1