In most apps a user exists because a server says so: it holds the account, checks the password and can take the account
away. A local-first app cannot depend on that server, because its data has to work offline and between peers. HALO makes
the user a key pair the device generates, and lets peers check each other’s keys directly.
Provides a way to write effectful code using generator functions, simplifying
control flow and error handling.
When to use
Use when you want to write effectful code that looks and behaves like
synchronous code, while still handling asynchronous tasks, errors, and complex
control flow such as loops and conditions.
Generator functions work similarly to async/await but keep errors,
requirements, and interruption in the Effect type. You can yield* values
from effects and return the final result at the end.
A user expects their laptop and phone to be the same person. HALO admits each new device with a device invitation from one
that already has the identity, so every device has its own key and the identity vouches for all of them. A lost phone
takes only its own key with it. Add a device walks through it.
When two peers sync a space, each one decides whether to accept the other’s changes. Membership is a
Keyhive graph of signed delegations that every peer holds, so the check needs
no server and still works when the peers meet on a local network.
Spaces and membership explains the graph.
There is no server that can reset a key pair. Instead the user sets up a recovery credential, such as a recovery code or a
passkey, while they still have a device, and uses it to admit a new device later.
Recover an identity shows how.
HALO is the identity of a user inside DXOS apps and spaces. It is not a login for third-party websites, and it does not
replace OAuth for signing in to services outside DXOS.