Files
DeepTutor/deeptutor/services/codex_auth
Bingxi Zhao (Frank) 01615d6c97 fix(codex): let a Docker sign-in finish from the pasted callback address
The provider redirects the browser to a loopback listener. Under Docker
that listener runs inside the container and the standard compose file
publishes only the Web and API ports, so the browser lands on a page it
cannot load while the sign-in waits until it expires. The card treated
localhost as native local execution and offered nothing else: the remote
guidance was gated behind a non-loopback hostname, so the one deployment
that most needs a way back in was the one that never saw it (#1252).

The browser can read that address even when this process cannot receive
it, so pasting it back is the recovery path. It goes to a new
authenticated endpoint on the Web origin, which resolves the caller's
*own* pending operation rather than scanning every login in the process
— the loopback route has to identify itself by OAuth state because it
arrives without a session, and this one does not.

``parse_oauth_callback_url`` is where the address is judged, once: it
must be this login's registered redirect URI down to scheme, host, port
and path, and a repeated OAuth parameter is ambiguous rather than
untidy, so it is refused instead of resolved to one of the two. The
string is parsed and dropped — never fetched, never stored, never
echoed. Past the parse it is ``receive_callback``, so the state check,
PKCE, the registered redirect URI and owner binding are the existing
ones rather than a second implementation of them.

The form now appears whenever a login is waiting, local or remote; the
SSH command stays remote-only, because that advice is.
2026-09-08 09:53:42 +08:00
..
2026-07-31 00:25:48 +08:00