Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(desktop): stop asking for keychain access on launch (#9347)

Eric Hayesdd6ddc514fab
diff --git a/apps/web/tauri/desktop-cef/AGENTS.md b/apps/web/tauri/desktop-cef/AGENTS.md
index 5b6415e11c..e219eea487 100644
--- a/apps/web/tauri/desktop-cef/AGENTS.md
+++ b/apps/web/tauri/desktop-cef/AGENTS.md
@@ -75,3 +75,8 @@ thin binary over `../src-tauri` (`app_lib::run_with`) that selects
- Keep `tauri.conf.json` aligned with `../src-tauri/tauri.conf.json` and
`tauri.macos.conf.json`: the CLI bundles from this file, while the app's
runtime config still comes from `../src-tauri`.
+- Keep `SecretStorage::Mock` in `src/main.rs`. With the system store, Chromium
+ keeps its cookie key in a "Chromium Safe Storage" keychain item and macOS asks
+ for keychain access on launch. The app's sign-in uses the native HTTP cookie
+ jar, so Chromium's own cookies (embeds) are all the mock key covers;
+ switching key sources drops those cookies once.
diff --git a/apps/web/tauri/desktop-cef/src/main.rs b/apps/web/tauri/desktop-cef/src/main.rs
index 46330806b9..db5ed9b4a4 100644
--- a/apps/web/tauri/desktop-cef/src/main.rs
+++ b/apps/web/tauri/desktop-cef/src/main.rs
@@ -4,8 +4,14 @@
// the entry point runs those and returns before the app starts.
#[cfg_attr(target_os = "macos", tauri_runtime_cef::cef_entry_point)]
fn main() {
+ // Chromium keeps its cookie key in a "Chromium Safe Storage" keychain item
+ // whose ACL macOS checks against the code signature, so the system store
+ // asks for keychain access on launch. Sign-in lives in the native HTTP
+ // cookie jar, not Chromium's, so the mock keychain protects nothing less.
#[cfg(target_os = "macos")]
- app_lib::run_with(tauri::Builder::default().runtime(tauri_runtime_cef::Cef::default()));
+ app_lib::run_with(tauri::Builder::default().runtime(
+ tauri_runtime_cef::Cef::default().secret_storage(tauri_runtime_cef::SecretStorage::Mock),
+ ));
#[cfg(not(target_os = "macos"))]
compile_error!("desktop-cef is the macOS build; other platforms build ../src-tauri");
}