mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 13:19:44 +08:00
For a remote or containerized deployment the browser's localhost is the user's workstation while the OAuth listener runs on the server, so a reverse proxy cannot deliver http://localhost:1455/auth/callback to that private listener and Codex sign-in could never complete. Keep the listener loopback-only and forward just the exact browser callback path through the Web origin to a state-validating broker. The settings card and CLI now show the real callback address, the SSH tunnel command, an explicit authorize action and a countdown, and survive a page reload; the deployment docs cover the Docker host-port and reverse-proxy caveats. The listener stays bound to loopback and ports 1455/1457 are never published; the Web bridge rewrites only /auth/callback; the broker requires an active operation and a constant-time state match; callback responses are no-store HTML that never echo the code or state; PKCE and the token exchange are unchanged. Binding the listener with start_serving=False also closes a window where a connection could be accepted before the callback object existed.