Skip to content

Signing in

xixo has no accounts of its own. It is a client of a masks tenant, and by default it serves that masks itself at /id on its own origin, so xixo.example.com signs in at xixo.example.com/id. The built-in masks runs in xixo’s processes, with its own database, session cookie, and keys. The masks tenant has the same name as xixo’s catalog, xixo unless XIXO_TENANT says otherwise.

MASKS_ISSUER_TEMPLATE names a masks server run apart from xixo instead. See a masks server of your own.

A new xixo has no client in masks. Connecting one starts a handshake at /auth/handshake:

  1. xixo sends the browser to masks with its name, its resource URL, its redirect URIs, and the scopes it uses.
  2. A masks account that may approve connections approves the request.
  3. masks returns a one-time initial access token, and xixo redeems it at masks’ registration endpoint, server to server.

xixo stores the client’s id and secret and its registration token, with the secret and the token encrypted. Disconnecting deletes the registration in masks. The account that owns the masks tenant becomes xixo’s administrator on its first sign-in.

GET /auth/session returns the signed-in account, or a 401 whose error is handshake_required or login_required, which tells the browser which button to show. Signing in asks for every xixo: scope except xixo:settings:admin. /auth?privilege=admin signs in again asking for that scope too, and masks grants it only to a person whose scopes in masks cover it. See who changes a resource and the scopes reference.

/graphql, /mcp, and /uploads all verify a masks access token. The browser’s token comes from its session, and other clients send Authorization: Bearer. A token is accepted only when:

  • it was issued by xixo’s masks issuer,
  • its audience is xixo’s resource URL, which is XIXO_PUBLIC_ORIGIN followed by /mcp, and
  • any tenant claim it carries names xixo’s catalog.

The browser’s session asks for the same audience, so one token works on every path. A token’s scopes decide what it reaches. See security.

When one xixo serves several catalogs, each has its own masks tenant, issuer, and audience. See multiple tenants.