Actions at a Glance
Most user and auth operations are unified under the controlUser action. The builder exposes them through a User Action dropdown. The login action is separate and used specifically for the sign-in page.
| Action Type | User Action Value | Builder Label | Use When |
| login | — | Login | Sign-in page: SSO redirect or password form submission |
| controlUser | logout | Control User → Logout | Sign the current user out |
| controlUser | refreshUserContext | Control User → Refresh User Context | Re-fetch user details after a backend change |
| controlUser | signInWithSSO | Control User → Sign In with SSO | Mobile only: trigger SSO login in system browser |
| controlUser | setLanguage | Control User → Set Language | Switch the app's language/locale |
| controlUser | setTheme | Control User → Set Color Scheme | Switch between light, dark, or system color scheme |
| controlUser | setInterfaceTheme | Control User → Set Theme | Switch the active interface theme |
| controlUser | setUserPreference | Control User → Set User Preference | Save an arbitrary user preference key-value |
login — Login
Signs the current user in against a chosen identity provider. Handles both SAML SSO redirect and password form submission. Used on sign-in pages only — both paths trigger a full-page navigation, so no follow-up action in the chain will run after login starts.
Parameters
| Parameter | Type | Required | Default | Description |
| method | "sso" | "password" | Optional (optional) | — | sso redirects to the SAML begin-login endpoint. password posts the form to /auth/login. Any other value is a no-op. |
| identityProviderId | string | Required (required) | — | The identity provider to authenticate against. If missing, the action silently does nothing — no redirect, no form post, no message. |
Warning: Login is a full-page navigation. Both paths trigger a full-page redirect. Any unsaved page state is lost and no later action in the same chain runs after login fires. Web only — mobile uses controlUser → signInWithSSO instead.
Note: Post-login destination: The action reads returnTo from the current URL and passes it through so the user lands back where they started. Use /login?returnTo=/dashboard to redirect after authentication.
Examples
SSO login from a Sign In button
{ "actionType": "login", "payload": { "method": "sso", "identityProviderId": "idp_company_saml" } }
Password login from a form submit
{ "actionType": "login", "payload": { "method": "password", "identityProviderId": "idp_local_password" } }
controlUser → Logout
Ends the current user's session. On web it signs out on the server and navigates to the home path /. On mobile it clears the stored session and returns to the logged-out screen.
Parameters
| Parameter | Type | Required | Default | Description |
| userControlAction | "logout" | Required (required) | — | Must be the exact string "logout". |
Note: Mobile biometrics: On mobile, if biometric login is enrolled the logout is "soft" — enough state is kept for biometric re-authentication. Without biometrics it's a "hard" logout that wipes all stored data.
Sign out button
{ "actionType": "controlUser", "payload": { "userControlAction": "logout" } }
controlUser → Refresh User Context
Re-fetches the signed-in user's details and refreshes all bindings that read {{ user.* }}. Use it after a backend operation that changes the user's profile, roles, or preferences — without requiring a re-login.
Refresh user context after updating profile
{ "actionType": "controlUser", "payload": { "userControlAction": "refreshUserContext" } }
controlUser → Sign In with SSO (Mobile)
On native mobile apps, opens a system browser to complete SSO authentication and starts a session. On web this action shows a warning and does nothing.
Parameters
| Parameter | Type | Required | Default | Description |
| userControlAction | "signInWithSSO" | Required (required) | — | Must be "signInWithSSO". Only available when app type is mobile. |
| identityProviderId | string | Required (required) | — | The identity provider to authenticate against. |
Mobile SSO sign-in
{ "actionType": "controlUser", "payload": { "userControlAction": "signInWithSSO", "identityProviderId": "idp_company_saml" } }
controlUser → Set Language
Switches the app's language/locale for the signed-in user. On a private interface it saves the choice; on a public interface it holds the choice in page state. Switching to a right-to-left language may reload the app to relayout.
Parameters
| Parameter | Type | Required | Default | Description |
| userControlAction | "setLanguage" | Required (required) | — | Must be "setLanguage". |
| language | string (locale) | Required (required) | "en-US" | The locale to switch to. Must be one of the interface's allowed locales; unsupported locales are silently ignored. |
Language selector button
{ "actionType": "controlUser", "payload": { "userControlAction": "setLanguage", "language": "{{ select_language['value'] }}" } }
controlUser → Set Color Scheme
Switches between light, dark, and system color schemes. Stored as userControlAction: "setTheme" (legacy name for backward compatibility).
Warning: Naming mismatch: "Set Color Scheme" in the builder stores userControlAction: "setTheme", NOT "setColorScheme". "Set Theme" (the interface theme picker) stores "setInterfaceTheme". Do not confuse the two.
Parameters
| Parameter | Type | Required | Default | Description |
| userControlAction | "setTheme" | Required (required) | — | Must be "setTheme" (legacy name for Set Color Scheme). |
| theme | "light" | "dark" | "system" | Required (required) | — | Color scheme to apply. system follows the device/OS setting. The field is named theme (not colorScheme) for backward compatibility. |
Dark mode toggle
{ "actionType": "controlUser", "payload": { "userControlAction": "setTheme", "theme": "dark" } }
controlUser → Set User Preference
Saves an arbitrary key-value preference for the signed-in user, scoped to this interface. Use it to persist any user choice that doesn't fit the built-in language, theme, or color scheme options.
Parameters
| Parameter | Type | Required | Default | Description |
| userControlAction | "setUserPreference" | Required (required) | — | Must be "setUserPreference". |
| key | string | Required (required) | — | The preference key to write. |
| value | any | Required (required) | — | The value to store. Evaluated before saving. Supports bindings. |
| recordId | string | Optional (optional) | — | Optional record ID the preference is scoped to. |
Save a preferred view mode
{ "actionType": "controlUser", "payload": { "userControlAction": "setUserPreference", "key": "orders_view_mode", "value": "{{ toggle_viewMode['value'] }}" } }
User Action Values Quick Reference
| Builder Label | Stored userControlAction | Platform |
| Set User Preference | setUserPreference | Web + Mobile |
| Set Language | setLanguage | Web + Mobile |
| Set Color Scheme | setTheme | Web + Mobile |
| Set Theme | setInterfaceTheme | Web + Mobile |
| Refresh User Context | refreshUserContext | Web + Mobile |
| Logout | logout | Web + Mobile |
| Check Auth | checkAuth | Mobile only |
| Sign In with SSO | signInWithSSO | Mobile only |