fix(auth): treat missing backend session token as auth-expired#1504
Conversation
`composio_list_connections` (and the parallel web_search / billing / team / webhooks / referral handlers) return a "no backend session token. Sign in first (auth_store_session)." error when the Rust auth profile is missing. Two consequences this fix addresses: - `is_session_expired_error` did not recognise the pattern, so the core reported it to Sentry as a hard error on every 5 s `useComposio Integrations` poll (see Sentry OPENHUMAN-TAURI-1N — 253 occurrences for a single user stuck on the onboarding SkillsStep). - `classifyRpcError` mapped the message to `'unknown'`, so the existing `core-rpc-auth-expired` → `CoreStateProvider.clearSession` → `ProtectedRoute` → `/` cascade never fired. The frontend kept its stale optimistic `sessionToken` patch and trapped the user on an onboarding step that could never load. Both sides now recognise the pattern, so the core stops spamming Sentry and runs its auto-cleanup, and the renderer bounces the user back to the login screen.
📝 WalkthroughWalkthroughThe PR extends auth-expired error classification across Rust and TypeScript layers to handle "no backend session token" backend errors. Both ChangesAuth-Expired Classification Extension
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Summary
Problem
Users on the onboarding$SkillsStep$ kept seeing $composio_list_connections$ fail with $"composio unavailable: no backend session token. Sign in first (auth_store_session)."$ every 5 s. Two consequences:
The same "no backend session token" pattern is produced by$webhooks$ , $billing$ , $team$ , $referral$ , $web_search$ , etc., so they all benefit from the same fix.
Solution
Submission Checklist
Impact
Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
Validation Run
Validation Blocked
Behavior Changes
Parity Contract
Duplicate / Superseded PR Handling
Summary by CodeRabbit
Bug Fixes
Tests