Skip to content

Commit 7aad500

Browse files
committed
docs: describe signing in from a terminal
The knowledge base gets the terminal's side of the signed API: what the user does at /activate, how the terminal waits for the decision, and how long a code lasts, next to the mobile app's sign-in, so the two read as one feature with two doors and no token. The product guide counts terminals among the surfaces of the signed API. 🤖 Generated with Claude Code Claude-Session: https://claude.ai/code/session_015x5yRP38qbcKd611Tf1ePD
1 parent d546b7a commit 7aad500

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎KNOWLEDGE_BASE.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,8 @@ Sources: [API routes](routes/api.php), [API controllers](app/Http/Controllers/Ap
433433

434434
An app can use the same `/api/v1` for you with signed requests. It keeps an SSH key on the device and signs every request with it; there are no passwords or API tokens. To sign in, the app opens `/mobile/authorize` on the web: sign in with GitHub if needed, check the key's fingerprint, and approve it. The key then becomes one of your devices, and it does not need to be on your GitHub account. A key that is only on GitHub, such as a GitHub Actions key, cannot use the signed API.
435435

436+
A terminal or an agent, which has no browser to be sent back to, signs in with a short code instead: it asks the API for one and shows it, you open `/activate` on the web, sign in with GitHub if needed, type the code, check the device's name and the key's fingerprint, and approve or deny it. The terminal asks the API every few seconds whether you decided, and signs in on its own once you approve. A code lasts **15 minutes**, and you can look up or decide **20 codes a minute**.
437+
436438
A signed request sees what the web shows you, such as your own pending commits. It can also, with the web's validation, moderation, and rate limits:
437439

438440
- read your account, logs, replies, notifications, and saved commits;
@@ -450,7 +452,7 @@ A signed request sees what the web shows you, such as your own pending commits.
450452

451453
Signed request bodies are JSON, or multipart when they carry images, so app commits can have images or a poll but no link-card choice. Voice notes, pinning, scheduling, search, and translations remain web-only. Signed requests are limited to **120 requests per minute per user**. Settings → Devices lists your approved devices with when each was last used, and revokes them.
452454

453-
Sources: [signed requests](app/Services/SignedRequests.php), [sign-in page](app/Http/Controllers/MobileAuthorizationController.php), [devices settings](resources/js/pages/device/index.tsx), [API routes](routes/api.php).
455+
Sources: [signed requests](app/Services/SignedRequests.php), [sign-in page](app/Http/Controllers/MobileAuthorizationController.php), [terminal sign-in page](app/Http/Controllers/DeviceActivationController.php), [terminal sign-ins](app/Http/Controllers/Api/DeviceAuthorizationController.php), [devices settings](resources/js/pages/device/index.tsx), [API routes](routes/api.php).
454456

455457
### Bug reports and feature requests
456458

‎PRODUCT.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Developers who left X or Bluesky, or are thinking about it, and want a feed with
2222

2323
## Operating Context
2424

25-
- Surfaces: the web app (also installable as a PWA), the mobile app through a signed JSON API, the terminal script and GitHub Action, a public read-only API, Atom feeds, and an activity graph SVG for GitHub READMEs.
25+
- Surfaces: the web app (also installable as a PWA), the mobile app and terminals through a signed JSON API, the terminal script and GitHub Action, a public read-only API, Atom feeds, and an activity graph SVG for GitHub READMEs.
2626
- Guests can read the Latest and Trending logs, profiles, approved commits and their threads, and search. Everything that writes or is personal (Following log, notifications, Saved, Remotes, Settings) needs sign-in.
2727
- Site admins (`ADMINS`) moderate (`/moderation`) and run the site (`/operations`).
2828
- Exact behavior, limits, and edge cases for every feature live in [KNOWLEDGE_BASE.md](KNOWLEDGE_BASE.md) and in the code; this file only records what must stay true.

0 commit comments

Comments
 (0)