How it works

Onelo runs as one backend that every SDK talks to over the same contract — so you write your integration once and it behaves the same on any stack. You wire it up one of three ways. Here’s how each fits together, and how it’s secured.

01

The shape

one backend, thin clients
Your app
Frontend
  • ·holds a publishable key (public)
  • ·signs users in on Onelo’s hosted page
  • ·gets a short-lived token + refresh
Your server · optional
Backend
  • ·holds a secret key (private)
  • ·verifies the user’s token with Onelo
  • ·never trusts a request on its word
Onelo
Onelo Backend
  • ·issues & verifies tokens — source of truth
  • ·same contract for every platform
  • ·flags, monitoring, payments, login

The SDKs are thin clients — the logic lives in Onelo. Swift front with a Node backend talks to Onelo exactly like Python with a JS front. Pick any stack; the wire is the same.

02

Choose your setup

frontend · backend · both
Setup A · standalone

Frontend only

Your app ──▸ Onelo
When

An app with no server of your own: desktop (macOS/Windows/Electron), mobile (iOS/Android/Flutter/React Native), or a web SPA. It talks to Onelo directly.

Modules
LoginFeaturesMonitorPaywallFeedback
How it’s secured
  • Hosted login — the user types their password on Onelo’s page, never in your UI. You never see the password.
  • Device attestation — Onelo verifies the request comes from your genuine, untampered app (App Attest / Play Integrity). This stands in for the missing secret key.
  • PKCE — an intercepted login code is useless without the secret your app generated.
  • Secure token storage — Keychain (Apple) / EncryptedSharedPreferences (Android), never plain storage.
  • Short token + refresh rotation — a stolen token expires fast; a stolen refresh invalidates the session.
  • Web: requests are accepted only from the domains you allowlist.

The key point for standalone apps: a frontend has no secret to hide. So Onelo secures it a different way — by proving the app is real (attestation), never exposing credentials (hosted login), and keeping tokens short-lived and safely stored. The publishable key being visible in your binary is fine by design.

Setup B · full

Frontend + backend

App ──▸ Your server ──▸ Onelo
When

You run your own server that owns your users’ data/logic and needs to trust that a request comes from a signed-in Onelo user.

Modules
Login (front)Token verifyFeaturesMonitor
How it’s secured
  • The front signs the user in (as in Setup A) and forwards their token to your server.
  • Your backend verifies that token with Onelo using its secret key — it trusts nothing on its word.
  • The backend computes nothing itself: Onelo is the source of truth for identity and plan.
  • The secret key never leaves your server; the frontend never sees it.
Setup C · server

Backend only

Your server ──▸ Onelo
When

A service with no UI — API, worker, cron. “Login” doesn’t exist (there’s no screen). Here “auth” means service authentication, not user authentication.

Modules
FeaturesMonitorLogin
How it’s secured
  • The server proves its identity to Onelo with the secret key on every call (plus client_secret).
  • You use Features + Monitor. For per-user flags you pass your own user ids (from your auth) to for_user().
  • The secret key lives in the server’s environment — never in your repo, never on a client.
03

Security primitives

the pieces, and where they apply

Two keys

publishable on the front (public) vs secret on the backend (private). A frontend physically can’t perform server-only operations.

Short-lived token

The user’s access token lives briefly and is refreshed automatically — a stolen one loses validity quickly.

Refresh rotation

The refresh token rotates on every use, with reuse detection — a stolen refresh invalidates the whole session.

Hosted login

front / standalone

Sign-in happens on Onelo’s page, not in your UI — you never touch the user’s password.

PKCE

The login code is worthless without a secret generated inside the app — it protects the exchange for a token.

Device attestation

mobile / desktop

Onelo checks the request comes from a real, unmodified build of your app.

Origin allowlist

web

Web apps are accepted only from the domains you configure in the dashboard.

client_secret

backend / server

A UI-less server proves itself with an extra secret — in place of Origin/attestation, which it doesn’t have.

04

Quick matrix

what each setup supports
ModuleFrontend onlyBackend onlyFront + backend
User login
✓ yeshosted login
✗ nono UI
✓ yeson the front
Token verification
— n/afront doesn’t verify
~ dependsonly if a client exists
✓ yesbackend, secret key
Features (flags)
✓ yes
✓ yesper-user via for_user()
✓ yes
Monitor (errors)✓ yes✓ yes✓ yes
Secured bypublishable + hosted login + attestation / Originsecret + client_secretpublishable (front) + secret (backend)
✓ supported ~ depends / n/a ✗ not supported
How it works — Onelo Docs