Add experimental Windows desktop client#5569
Add experimental Windows desktop client#5569WizardOfCommits wants to merge 1 commit intoBasedHardware:mainfrom
Conversation
Made-with: Cursor
Greptile SummaryThis PR adds an experimental WPF/.NET 9 Windows desktop client for Omi, along with an implementation of Firebase custom token generation in the existing Rust desktop backend. The Windows client follows the same Firebase ID token trust model as the mobile/macOS clients — the backend verifies the token server-side — and introduces a new Key changes and issues found:
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant WinApp as Windows App
participant Browser
participant Backend as Omi Backend
participant Firebase as Firebase Identity Toolkit
User->>WinApp: Click Open login page
WinApp->>Browser: Open /v1/auth/authorize
Browser->>Backend: GET /v1/auth/authorize
Backend-->>Browser: Redirect to Apple OAuth
User->>Browser: Sign in with Apple
Browser->>Backend: OAuth provider callback
Backend-->>Backend: Generate Firebase custom token RS256 JWT
Backend-->>Browser: Render callback page with auth code
User->>WinApp: Paste auth code manually
WinApp->>Backend: POST /v1/auth/token (grant_type=authorization_code)
Backend-->>WinApp: custom_token
WinApp->>Firebase: POST accounts:signInWithCustomToken
Firebase-->>WinApp: idToken plus refreshToken
WinApp->>WinApp: Persist idToken to Windows Registry
WinApp->>Backend: WSS /v4/listen with idToken
Backend-->>WinApp: Transcript JSON frames
WinApp->>Backend: HTTP /v1/users/profile with idToken
Backend-->>WinApp: Profile data
|
Summary
This PR adds an experimental Windows desktop client (WPF / .NET 9) that integrates with the existing Omi backend and Firebase-based auth, without modifying the existing mobile or macOS flows.
windows/directory with a WPF app (Omi.Windows.App) and a contributor‑orientedwindows/README.md./v1/authendpoints (Python backend) and usesuse_custom_token=trueon/v1/auth/tokento obtain a Firebase custom token./v4/listen.Auth flow (Windows)
GET /v1/auth/authorize?provider=apple&redirect_uri=omi://auth/callbackin the system browser.auth_callback.html, which redirects to the app usingomi://auth/callback?code=....codeinto the Windows app (current UX), which calls:POST /v1/auth/tokenwithgrant_type=authorization_code,code,redirect_uri, anduse_custom_token=true.custom_tokengenerated viafirebase_admin.auth.create_custom_tokenon the server.idToken.idTokenasAuthorization: Bearer <idToken>for:/v1/users/profile,/v1/conversations/*/v4/listen(real-time transcription), which usesverify_id_tokenserver‑side.This mirrors the trust model of the existing mobile/desktop clients: the backend still verifies a real Firebase ID token, and the client does not need any privileged service account credentials (only the public Web API key).
Windows client behavior
/v1/auth/authorizeURL in the browser.codefrom theomi://auth/callback?...URL./v4/listen(segments, events, or errors) for debugging and verification.Configuration
OMI_API_BASE_URL(defaulthttps://api.omi.me/).OMI_FIREBASE_API_KEYorFIREBASE_API_KEY(the public Firebase Web API key for thebased-hardwareFirebase project).Known limitations / open questions
https://api.omi.metoday,/v4/listenis currently returning HTTP 403 for this flow, even though the client presents a Firebase ID token obtained viasignInWithCustomToken. This suggests a configuration/deployment detail on the backend or Firebase side, rather than a client‑side issue.omi://auth/callbackscheme is handled manually by asking the user to copy thecodefrom the URL. A future iteration should register a proper Windows URI handler and parse thecodeautomatically.Why this is safe
/v1/auth/*,/v4/listen,/v1/conversations, etc.).