Sign-in via OAuth (Google, GitHub, Twitter) fails consistently when the app is configured to use a self-hosted cloud runtime. Sign-in only succeeds when using the local embedded runtime.
- Install OpenHuman on Windows 11 (fresh .msi install)
- On runtime selection, choose Run on the Cloud
- Enter a self-hosted
openhuman-coreURL and valid token — connection test shows Connected. You're good to go. - Click Continue
- Attempt sign-in via Google, GitHub, or Twitter
- Browser opens, authentication completes successfully
- Browser shows "close this and return to the app"
- Return to app → "Sign-in failed. Please try again."
Expected behavior Sign-in should succeed and open the main app regardless of whether the runtime is local or cloud.
Actual behavior
- Cloud runtime → sign-in always fails after OAuth callback
- Local runtime (embedded sidecar) → sign-in works correctly
- Also observed when trying Continue Locally:
Failed to load secret-store master key from keychain: Keyring backend error: master key unavailable — cannot store secrets
Environment
- OS: Windows 11
- OpenHuman version: latest release (.msi)
- Runtime: Self-hosted
openhuman-corev0.56.0 on Hetzner VPS (Ubuntu 24.04, Docker), exposed via Cloudflare tunnel - WebView2: 148.0.3967.96
Additional context
This may be related to #2298. The OAuth protocol handler (openhuman://) was manually registered in the Windows registry — did not resolve the issue. Workaround: use local runtime for sign-in, then switch to cloud runtime after authentication.
Implementation Plan
Triage Assessment
- User reports OAuth sign-in (Google/GitHub/Twitter) always fails when the app is configured to use a self-hosted cloud runtime. Local embedded runtime works fine.
- One community member confirmed the same issue then retracted ("config issue on my end"). Original reporter hasn't confirmed resolution.
- Possibly related to #2298 (OAuth protocol handler). The
openhuman://deep-link handler registration may not carry the remote-core URL/token to the auth callback path.
Proposed Scope
- In-scope: identify why
openhuman://auth?token=...callback resolution differs between local and remote core mode. - Not in scope: the broader "first-class remote core setting" (tracked separately).
Implementation Steps
- Root cause investigation — trace the OAuth callback flow for cloud-runtime mode:
openhuman://deep link →webview_accounts/deep_link_authmodule → RPC to core. Determine why the core denies or drops the session token in remote mode. - Fix — adjust the callback handler to use the configured remote-core RPC URL instead of the default localhost bind.
- Test — integration test with a mock remote-core endpoint covering the full OAuth callback →
store_session→ active-user transition. - Add diagnostics to the sign-in flow so failed OAuth callbacks log the attempted core URL and error reason.
Verification
- Sign-in with Google/GitHub/Twitter succeeds when app is configured with a self-hosted cloud runtime URL.
- Existing local-runtime sign-in continues to work (regression test).
- Diff coverage >= 80%.
Same issue. Remote deployment is unusable
EDIT: It was a config issue on my end. I missed certain default settings from the env.
Fixed — closing
This was diagnosed and fixed in two parts, and the code still carries the issue number. Verified on main (6be58a9ab).
Root cause. auth_store_session makes the core validate the freshly minted session token against the backend GET /auth/me before persisting it. In cloud mode that validation runs on the user's remote openhuman-core, not on the desktop — so if the remote runtime could not reach or authenticate against the backend, the profile was never written and the user bounced straight back to the sign-in page after a successful OAuth round trip. That is exactly the reported sequence: browser completes, "close this and return to the app", then "Sign-in failed. Please try again." Local mode worked because the embedded core could reach the backend directly.
Fix 1 — a transient validation failure no longer discards the session. src/openhuman/security/credentials/ops_part_01.rs:266-334 adds allow_pending_backend_validation. A non-transient failure still refuses to persist (correct — that is a real rejection), but a transient one (timeout, gateway 5xx) now persists the session provided the JWT carries a live local exp:
if !auth_me_store_failure_is_transient(&reason) { … return Err(…); }
if !allow_pending_backend_validation { … return Err(…); }
let Some(exp) = jwt_exp_live_at(trimmed_token, chrono::Utc::now()) else { … };
Wired through the RPC schema with a camelCase alias (src/openhuman/security/credentials/schemas.rs:17-18) and covered by tests (schemas_tests.rs:166-184).
Fix 2 — the blanket retry message was replaced with mode-aware, actionable copy. app/src/utils/desktopDeepLinkListener.ts:421-427 names this issue directly:
Build the user-facing message for an auth-store failure (issue #3025). … In cloud mode that validation runs on the user's remote
openhuman-core, so the dominant failure is the remote runtime being unable to reach/authenticate against the backend (misconfiguredBACKEND_URL, offline, or an older core that predatesallowPendingBackendValidation) — not a problem the desktop can retry away.
Cloud-mode failures now classify (auth_me_unauthorized, auth_me_timeout, auth_me_gateway, network, config_unreadable, …) and point at the remote runtime instead of telling the user to retry forever. Test suite: desktopDeepLinkListener.test.ts:570 — describe('authStoreFailureUserMessage (issue #3025)').
Landed in 208b51d5d — "fix(auth): actionable cloud-runtime sign-in failure message + docs (#3025) (#4649)", 2026-07-08.
Your core version is the specific case this covers. The report was against self-hosted openhuman-core v0.56.0, and the code comment calls out "an older core that predates allowPendingBackendValidation" as a dominant cause. A self-hosted core needs to be updated for the host-side half to take effect.
Two notes for anyone arriving here from a search:
- The onboarding flow in the repro no longer exists. The runtime step is now Simple vs Run Custom (
app/src/pages/onboarding/steps/RuntimeChoiceStep.tsx); there is no "Run on the Cloud" card with a self-hosted core URL + token field. Remote core is configured under Settings → Developer Options → Remote core RPC (DeveloperOptionsPanel.tsx:253). - The secondary keyring symptom is handled separately now.
Failed to load secret-store master key from keychain: Keyring backend error: master key unavailable — cannot store secrets(src/openhuman/security/keyring/encrypted_file_backend.rs:323) now raises a consent flow rather than failing silently —keyring_consent/policy.rs:231-233publishes aKeyringConsentRequiredevent. If that specific error is still hit on Windows 11, it deserves its own issue rather than riding along here.
Also noting for the record that the one confirming report on this thread was retracted by its author ("It was a config issue on my end. I missed certain default settings from the env.").
Closing as completed. @jeremymartinus-pixel — if sign-in still fails on a self-hosted core running a current build, please reopen with the [credentials][auth-store] WARN line from the app log; it now names the failing api_url and the reason, which pinpoints whether it is the remote core's BACKEND_URL or something else.