Skip to main content

Connect the RPM app to a sandbox project

Use this page when the demo is running and you want to test Patient sign-in and server-backed saves. Demo mode does not require a project or account.

Set up the project​

An Ovok project administrator should follow project setup and review Access Policies. For this app:

  1. Use a sandbox project and copy its tenant code.
  2. Enable patient sign-in with PATIENT_LOGIN_ENABLED.
  3. Give the Patient AccessPolicy only the patient-scoped access needed for the Patient profile, Observation writes, and QuestionnaireResponse updates used by this app.
  4. Enable transaction-bundles for SDK measurement saves. When changing the feature list, preserve other enabled entries because feature PATCH replaces the whole list.
  5. Obtain an authorized Patient account in that tenant. The app signs in existing patients; it does not create projects or register patients.

An Ovok Console or administrator account is not a Patient account. Do not put a ClientApplication secret in the mobile app.

Configure the app​

The example defaults to https://api.sandbox.ovok.com and tenant public-example. These values let the demo run; the tenant name does not grant permission to sign in. To use your own sandbox project:

cp .env.example .env

Set the API origin and tenant for the same environment:

EXPO_PUBLIC_OVOK_BASE_URL=https://api.sandbox.ovok.com
EXPO_PUBLIC_TENANT_CODE=your-sandbox-tenant-code

Restart Metro after editing .env. Expo includes every EXPO_PUBLIC_ value in the client bundle, so use these fields only for public configuration. Never place passwords, tokens, or client secrets in this file.

Sign in and verify a save​

In Ovok Care, open Settings → Sign in to your project and enter the sandbox Patient credentials. If the account uses MFA, enter its verification code when prompted. Complete a test check-in and confirm its QuestionnaireResponse in the same sandbox Patient record. A server save failure remains visible as Needs sync and can be retried from the app.

For current account behavior, see patient login, patient registration, and the transaction-bundles feature.

Explore the source: Settings.tsx implements sign-in and MFA continuation; ovok.ts configures the SDK client and environment; storage.ts supplies persistent client storage.

Troubleshooting​

ProblemCheck
Sign-in failsConfirm API origin and tenant match, the account is a Patient in that tenant, patient sign-in is enabled, and the account has the expected AccessPolicy. See authentication troubleshooting.
QuestionnaireResponse save failsConfirm the Patient can update the response resource and that the app is signed in to that Patient.
Measurement shows Needs syncCheck connectivity and Patient write access; confirm transaction-bundles is enabled, then retry.
The previous tenant still appearsStop and restart Metro after changing .env.