Look up auth connections by domain instead of stored ID
Connection IDs change when re-authing. Instead of storing IDs in
settings.json (which go stale), look up connections by domain at
runtime via kernel.auth.connections.list({ domain }). This keeps
the applier in sync regardless of connection recreation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -137,9 +137,8 @@ async function main() {
|
||||
browser = await createBrowser(settings, null); // no profile needed
|
||||
} else {
|
||||
// Check auth status before creating browser
|
||||
const connectionIds = settings.kernel?.connection_ids || {};
|
||||
const kernelApiKey = process.env.KERNEL_API_KEY || settings.kernel_api_key;
|
||||
const authResult = await ensureAuth(platform, kernelApiKey, connectionIds);
|
||||
const authResult = await ensureAuth(platform, kernelApiKey);
|
||||
if (!authResult.ok) {
|
||||
console.error(` ❌ ${platform} auth failed: ${authResult.reason}`);
|
||||
await sendTelegram(settings, `⚠️ *${platform}* auth failed — ${authResult.reason}`).catch(() => {});
|
||||
|
||||
Reference in New Issue
Block a user