Start a Device sign-in
A Device asks to sign in (OAuth device flow, RFC 8628 style). The app opens verification_uri_complete (or verification_url) in the browser and polls /device-sign-ins/token. The flow: 1. A first-party app sends `app_version` and gets `verification_uri_complete`: `/connect#code=WDJB-MJHT`, the code in the fragment, so no proxy logs it. The app opens it itself and keeps its own window in front with the code in large type ("Waiting for your approval in the browser"). 2. A desktop app (macos, windows, linux, with `app_version`) may also send `loopback: {port, nonce_sha256}` (docs/contract/engine.md "Loopback proof"): it listens once on `127.0.0.1:<port>` and answers the page's `GET http://127.0.0.1:<port>/tiltas/sign-in-proof` with `{"nonce": "<64 hex>"}`, once, only to the page's Origin and only for `Host: 127.0.0.1:<port>` (answering the browser's Private Network Access preflight). `nonce_sha256` is the SHA-256 of the nonce, in hex. The page passes the nonce to approve as `loopback_nonce`; it stands in for "same network" when the person is on another VPN or IPv6 path. 400 for a malformed `loopback`, or a `nonce_sha256` an earlier sign-in carried (every sign-in needs a new nonce). Engines from before `os_version` and `loopback` send neither; both are optional. 3. The app polls `POST /device-sign-ins/token` every `interval` seconds. The first poll after the approval returns the credentials, once; the app then finishes by itself (no click in the app). With Device approval on it keeps getting `authorization_pending` until an Admin approves the Device (up to 7 days). `client: openpanel`, or `audience: openpanel` from a Tiltas app opened by OpenPanel's deep link, makes a Partner sign-in: only that Partner's routes handle it.
A Device asks to sign in (OAuth device flow, RFC 8628 style). The app opens verification_uri_complete (or verification_url) in the browser and polls /device-sign-ins/token.
The flow:
- A first-party app sends
app_versionand getsverification_uri_complete:/connect#code=WDJB-MJHT, the code in the fragment, so no proxy logs it. The app opens it itself and keeps its own window in front with the code in large type ("Waiting for your approval in the browser"). - A desktop app (macos, windows, linux, with
app_version) may also sendloopback: {port, nonce_sha256}(docs/contract/engine.md "Loopback proof"): it listens once on127.0.0.1:<port>and answers the page'sGET http://127.0.0.1:<port>/tiltas/sign-in-proofwith{"nonce": "<64 hex>"}, once, only to the page's Origin and only forHost: 127.0.0.1:<port>(answering the browser's Private Network Access preflight).nonce_sha256is the SHA-256 of the nonce, in hex. The page passes the nonce to approve asloopback_nonce; it stands in for "same network" when the person is on another VPN or IPv6 path. 400 for a malformedloopback, or anonce_sha256an earlier sign-in carried (every sign-in needs a new nonce). Engines from beforeos_versionandloopbacksend neither; both are optional. - The app polls
POST /device-sign-ins/tokeneveryintervalseconds. The first poll after the approval returns the credentials, once; the app then finishes by itself (no click in the app). With Device approval on it keeps gettingauthorization_pendinguntil an Admin approves the Device (up to 7 days).client: openpanel, oraudience: openpanelfrom a Tiltas app opened by OpenPanel's deep link, makes a Partner sign-in: only that Partner's routes handle it.
application/json- body
name*stringlength <= 63os*string"macos""ios""android""windows""linux"app_version?stringlength <= 32os_version?stringthe OS's own version, kept as one plain line; optional (engines from before it send none)
length <= 64client?stringthe app asking: empty for Tiltas's apps; openpanel for OpenPanel's app and tiltas up --client openpanel, whose sign-ins only the partner API approves
"""openpanel"audience?"openpanel"who approves: left out for Tiltas's own /connect page; openpanel for that Partner only (implied by client openpanel)
"openpanel"loopback?desktop apps (macos, windows, linux) that send app_version: the one-time loopback listener for the proof. The Panel keeps only the hash and never returns it
Started
application/json- response
device_code*stringsecret, only the Device knows it
user_code*stringverification_url*stringthe page without the code, where the Member types the user_code shown on the Device (the CLI prints it). For a Partner sign-in: PARTNER_CONNECT_URL (default https://openpanel.sh/network/connect)
verification_uri_complete?stringonly for an app that sent app_version: the page with the code filled in (in the fragment). Approvable for 5 minutes (prefill_expires_at), only from the browser that opens it first
prefill_expires_at?stringdate-timeexpires_at*stringdate-timeinterval*integerseconds between polls
curl -X POST 'https://tiltas.openpanel.sh/api/v1/device-sign-ins' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "os": "macos"}'{ "device_code": "string", "user_code": "string", "verification_url": "string", "verification_uri_complete": "string", "prefill_expires_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "interval": 0}Sign Out Everywhere DELETE
Ends every console session of the signed-in person, this one too ("Sign out everywhere").
Accept an invite POST
Joins the Network the invite is for. The signed-in Member's address must be the invited one (403 otherwise); an expired, revoked or used invite is 400 expired_token.