Skip to content

fix(auth): Support Brave, Arc, and Opera browser cookie extraction#101

Merged
ainergiz merged 2 commits intomainfrom
fix/brave-arc-cookies
Jan 3, 2026
Merged

fix(auth): Support Brave, Arc, and Opera browser cookie extraction#101
ainergiz merged 2 commits intomainfrom
fix/brave-arc-cookies

Conversation

@ainergiz
Copy link
Owner

@ainergiz ainergiz commented Jan 3, 2026

Summary

Fixes Brave, Arc, and Opera browser authentication by passing explicit cookie database paths to sweet-cookie.

Without this fix, selecting these browsers in the picker would try to read Chrome's cookies instead, causing auth to fail.

Changes

  • Add getChromiumCookiePath() to resolve explicit cookie DB paths for Brave/Arc/Opera
  • Pass the path via chromeProfile so sweet-cookie accesses the correct keychain
  • Add Opera to browser detection and type definitions

Why This Workaround

The upstream @steipete/sweet-cookie doesn't yet have the chromiumBrowser option that would handle this cleanly. We've submitted a PR for it: steipete/sweet-cookie#2

Fixes #100

🤖 Generated with Claude Code

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>
@ainergiz ainergiz force-pushed the fix/brave-arc-cookies branch from 104fd14 to f2f7384 Compare January 3, 2026 09:48
@ainergiz ainergiz changed the title fix(auth): Support Brave and Arc browser cookie extraction fix(auth): Support Brave, Arc, and Opera browser cookie extraction 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 ainergiz merged commit ee57459 into main Jan 3, 2026
4 checks passed
@ainergiz ainergiz deleted the fix/brave-arc-cookies branch January 3, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track sweet-cookie chromiumBrowser feature

1 participant