Repository navigation
Description
Summary
Community developers are still blocked from contributing to the mobile app: the supported iOS/Android setup path signs users into based-hardware-dev, then sends those tokens to https://api.omiapi.com/, whose live backend verifies Firebase identities for based-hardware. The resulting API calls fail with 401 after an apparently successful sign-in.
This follows up on #5939, which was closed without an implementation. Community users have continued to ask for a supported mobile development path, including the latest follow-up on that issue.
Verified current state
app/setup.shandapp/setup/scripts/setup.ps1copy prebuilt Firebase configs forbased-hardware-devinto iOS and Android dev builds.- The prebuilt Android, iOS, and Dart Firebase options all declare
based-hardware-dev. - Codemagic has eight active FlutterFire dev-config generation steps that also use
--project=based-hardware-dev, so CI rebuilds recreate the mismatch. - The deployed dev Cloud Run backend and GKE listener use a
based-hardwareFirebase service account; the backend initializes Firebase Admin with that credential and verifies bearer ID tokens.
Proposed scope
- Regenerate the prebuilt Firebase configuration as a complete set against
based-hardwarefor the existing dev app registrations. Do not text-replace project IDs: API keys, app IDs, client IDs, storage buckets, and auth domains are project-specific. - Update each Codemagic dev-config FlutterFire invocation to use
based-hardwareand a CI service account with access to that project. Verify the configured Android and iOS app registrations exist there. - Repoint or remove the currently-unused service-account generator functions in
app/setup.shandapp/setup/scripts/setup.ps1so they cannot reintroduce the mismatch. - Update developer documentation that currently normalizes the 401 or tells developers that
based-hardware-devis the expected remote-dev Firebase project. - Add a regression check asserting that any mobile profile targeting
api.omiapi.comuses Firebase projectbased-hardware.
Keep separate
Do not globally replace every based-hardware-dev reference. It remains the dev deployment/registry/Secret Manager project, and isolated local-backend work needs a distinct local Firebase/emulator profile. The desired profiles are:
| Profile | API | Firebase identity |
|---|---|---|
| Community remote staging | https://api.omiapi.com/ |
based-hardware |
| Isolated local development | local backend/emulator | emulator or based-hardware-dev |
The native macOS desktop app is already correctly configured for based-hardware; legacy Flutter macOS CI configuration should be updated or retired with the mobile config work.
Acceptance criteria
- A clean iOS and Android community setup can sign in and make an authenticated request to
api.omiapi.comwithout a 401. - Codemagic-built dev artifacts use the same Firebase project as the remote backend.
- The local-development path remains documented and usable without silently pointing at production data.
Related to #5939.
Activity
aryanorastar commentedon Aug 5, 2026
Opened phase-1 PR: #11135
Landed without FlutterFire/GCP admin access:
setup.sh/setup.ps1whenapi.omiapi.com+ prebuilt ≠based-hardware(escape:OMI_ALLOW_FIREBASE_MISMATCH=1for local/emulator)based-hardware-devFlutterFire generators that would reintroduce the mismatchAppSetup.mdxStill needs a maintainer to regenerate
app/setup/prebuilt/*via FlutterFire againstbased-hardware(not text-replace — #5945), empty the allowlist, and retarget Codemagic SA/project. Until then default communitysetup.shexits 1 instead of silently producing 401s.fix(app): honor local API_BASE_URL and cross-check Firebase trio (Bas…
fix(app): StrictMode PS1 Dart parser + align BasedHardware#9404 with B…
aryanorastar commentedon Aug 15, 2026
Update: closed #11135 as superseded by #11273’s explicit local vs beta Firebase/API profiles.
Default community setup on
mainno longer points local builds atapi.omiapi.com+based-hardware-dev. If #9404 can still reproduce on the beta/remote path (or via leftoversetup/prebuilt/google-services.jsonstill labeledbased-hardware-dev), please say so — that would be a small follow-up under the new profile model, not a reopen of #11135.Git-on-my-level commentedon Sep 8, 2026
Closing as resolved on current main. The pairing this issue reported (sign in to based-hardware-dev, then call api.omiapi.com) no longer exists: app/setup.sh and setup.ps1 copy only the -Local Firebase configs (project demo-omi-local) for the supported local profile, and the only profile that targets api.omiapi.com is mobile_beta, generated with flutterfire --project=based-hardware. #11273 landed the explicit local-vs-beta profile model that superseded #11135. Two cosmetic leftovers, not worth holding this open: app/setup/prebuilt/{google-services.json,GoogleService-Info.plist,firebase_options.dart} still declare based-hardware-dev and are unreferenced, and check-mobile-production-routing.py pins api.omi.me rather than also guarding api.omiapi.com.