Summary
After the browser cookie extraction package is added at internal/browser/cookies/, the Slack desktop cookie extraction code at source/slack/desktop/cookies.go should be refactored to use the shared Chrome decryption functions instead of having its own copy.
Current state
source/slack/desktop/cookies.go has its own Chrome cookie decryption:
getKeychainPassword() - macOS Keychain access
decryptCookie() - AES-128-CBC with PBKDF2 key derivation
copyToTemp() - temp file copy to avoid browser locks
The new internal/browser/cookies/chrome.go package will have the same logic as a shared utility.
What to do
- Update
source/slack/desktop/cookies.go to import and use internal/browser/cookies
- Remove the duplicated decryption functions from the Slack package
- Keep Slack-specific logic (cookie paths, host filtering, xoxd token extraction)
- Verify existing Slack tests still pass
Summary
After the browser cookie extraction package is added at
internal/browser/cookies/, the Slack desktop cookie extraction code atsource/slack/desktop/cookies.goshould be refactored to use the shared Chrome decryption functions instead of having its own copy.Current state
source/slack/desktop/cookies.gohas its own Chrome cookie decryption:getKeychainPassword()- macOS Keychain accessdecryptCookie()- AES-128-CBC with PBKDF2 key derivationcopyToTemp()- temp file copy to avoid browser locksThe new
internal/browser/cookies/chrome.gopackage will have the same logic as a shared utility.What to do
source/slack/desktop/cookies.goto import and useinternal/browser/cookies