Features / Onboarding & setup

Login

Users sign in with a Bridge account (username, organisation and password) through the shared account library. Only one account per device is allowed and there is no self sign-up or forgot-password.

FactsheetOnboarding & setup
Who uses it
CadreUnit In-Charge / FMT L1
How you get here
Opened automatically by the splash when no Bridge account exists on the device; re-opened when the session expires.
APIs
4 calls today, 2 App Service operations
Offline
Requires internet.

Screens

ScreenWhat it doesSource
Login (account-lib)Carousel of up to 6 splash images above the username/organisation/password form.account-lib: library/src/main/res/layout/content_authenticator.xml
Splash (logic)Starts login and handles the result.app/src/main/java/org/platformcommons/urvi/view/splash/SplashActivity.kt

What it captures

FieldTypeRequiredValidationOptions from
UsernametextYesBlank shows "Username cannot be left blank". Lower-cased and trimmed. Accepted as login@@tenant, email@@tenant, or a plain email (then @@<tenantName> is added). An email must match [a-zA-Z0-9._]+@[a-z]+\.+[a-z]+.Typed
OrganisationtextIf the username has no @@tenant and is not an emailInvalid username shows "User id does not exist."; empty organisation shows "Organization name cannot be left blank". The account name becomes username@@org.Typed
Passwordpassword with show/hideYesBlank shows "Password cannot be left blank".Typed

Rules

Conditions from the code, rewritten as plain decision rules.

WhenThen
There is no internetA "no net connection" toast is shown and login does not proceed.
The tenant is the configured federation tenantThe app switches its base URL to the federation server.
The user cancels loginThe app closes.
Login succeedsThe account is stored, the crash-reporting user id is set, the session id is fetched into HEADER_SESSION_ID and the app moves on to fetch the user's profile and role.
Login returns no accountAll data is cleared and the account check runs again.
The app is online and the stored session id is empty (Home or Settings)A "Session expired" dialog appears; Login re-authenticates through the Android account manager.

API contracts

Each call opens to its use case, headers, request and response bodies, and errors.

Today: callUseReplaced by
PUT /ctld/api/device/deviceid/v1Register the phone with Bridge and get its device id before login.
POST /ctld/api/session/v1Sign the user in and get a session token.
GET /rtld/api/dataset/v1/execute?name=PlusOneTenantUserDataLoad the signed-in user, tenant, roles and assigned work nodes; decides cadre vs Unit In-charge/FMT flow.
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneUrviGeoDataForVOs/executeLoad the work-node (geography) hierarchy for the work-node picker.
App Service v2: operationUse
POST /auth/loginLog in with login, tenant and password
POST /auth/refreshRotate the refresh token

Behaviour notes

  • Urvi config: multiUser=0, selfRegistration=0, forgotPassword=0, rememberMe=0, splashScreen=1, useIeSessionV2=1 (app/src/main/res/values/configfile.xml).
  • Session re-login code is duplicated in HomeActivity and SettingsActivity.

Improve in the rewrite

  • Put session refresh in one shared component instead of two activities.
  • Show a clear inline error for each field rather than toasts.