Skip to content
C.W.K.
Stream
Lesson 03 of 04 · published

Refresh, Never a Parallel Login

~12 min · auth, oauth, doctrine

Level 0Cold Stick
0 XP0/41 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

The Move This Engine Will Not Make

A coding engine that wants every brain available will feel the pull to become a login app. Device codes, redirect URIs, a client id of its own, a consent screen that says a family name. That path is a standing refusal. Firebrand never runs a parallel authorization. It never impersonates a vendor's client. It never copies a credential out of a store to pretend it is someone else.

What it may do is continue a session the operator already opened with the vendor's own login. The only OAuth operation under the legs is a refresh-token grant, under the client id the vendor's own token already names. The write-back is atomic, unknown fields are preserved, and a reused or rotated refresh is re-read once, retried once, then surfaced as 'go run their login again.' A transport failure mid-refresh is not blindly retried when the vendor rotates refresh tokens.

Keys Are Narrower Than They Look

Some brains have a documented third-party API key. Those legs use that key, with a truthful client identifier, and nothing else. The credential-plus-fake-user-agent path is the same refusal wearing a different shirt. Keys resolve lazily from the environment, then from an operator secrets file, only when a leg names them. They stay on the leg instance. They are not exported into a child's environment. Doctor prints the resolved source by name and never prints a value.

Continue their session. Do not become their client. If the operator has not logged in with the vendor's own tool, Firebrand does not invent a way around that fact.

Usage Is the One Narrow Read

Two subscription brains have a quota worth watching. One is asked through that vendor's own local app-server, so no credential is read at all. The other is a declared amendment: a read-only look at a usage endpoint using a token the operator already has, no write, no refresh, no inference spend, truthful user agent. The paid inference API stays banned. A stale token is reported, never repaired.

Code

Auth vocabulary the legs folder is not allowed to grow·text
FORBIDDEN under legs/
  /authorize
  /deviceauth
  code_verifier
  redirect_uri
  a literal client_id value

ALLOWED
  refresh-token grant
  under the id the vendor CLI's own token already names

External links

Exercise

Open any helper you have written that talks to a vendor API. Search it for a client id, a user-agent string, and a refresh write. If you minted the id or borrowed a product name, write the sentence that would have refused the helper.
Hint
The test is 'would their login page recognize this as their own client?' If yes and you are not them, stop.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.