McpAuthLogin
Category: Commands
Source: mcp_auth_login.dart
Unified driver for the MCP OAuth login state machine.
Three surfaces run the exact same flow — the glue mcp auth login CLI command, the /mcp auth login slash command, and the TUI's automatic re-auth prompt. Each used to copy-paste the McpAuthFlowRunner states listener, the McpConfigWriter.updateAuth write-back, and the reconnect.
[runMcpAuthLogin] owns that machinery. Call sites collapse to building the runner inputs and passing a message sink (e.g. stdout.writeln, ctx.conversation.notify, or _addSystemMessage). The write-back uses the slash variant's soft-warning-on-failure behaviour everywhere: tokens are already stored, so a failed config update is non-fatal.