fix(auth): M117 微软登录缺 client id 说「未配置」而不是「未支持」
用户实跑 debug 二进制看到「本期未支持」,误以为功能没做;实际是构建/启动时 没注入 Azure 公共客户端 id(登录三轨已实现、白名单已批、真机验签过)。 - core/auth/microsoft/client_id.rs(新):id 的来源判定(env > build,空白值不算配)、 `ClientIdStatus`/`log_line()` 那行 `[auth] msa client_id=… source=…`、以及 「未配置 + 怎么配(含可照抄命令)」的共用文案 `MISSING_CLIENT_ID_MESSAGE`。零网络。 - core/auth/error.rs:`AuthError::Unsupported` 不再统一拼「本期未支持:」前缀——该变体 全仓唯一构造点就是缺 client id,硬拼前缀让「没配置」被读成「没实现」。`code()` 仍是 `unsupported`,枚举形状与其它分支不动(tower 批的最小改动)。 - core/auth/microsoft/mod.rs:`from_env()` 走 `resolve_client_id()`,失败措辞取自上面那条 文案,且在网络之前早退(连 HTTP 客户端都不建);导出 `client_id_status()`。 - cli:`map_auth_error` 的 Unsupported hint 给两条能照抄的命令;`accounts` 帮助说清 「不是功能缺失」与两种注入方式;新增 `msa_client_id_log_line()` 给 GUI 侧出面。 - app-iced:`on_boot` 打一行 `[auth] msa client_id=… source=…`(判据来自 core,不重算)。 - i18n:`LaunchMsaNotConfigured` 中英各一条,golden 按 `Key::ALL` 顺序在 `LaunchFailedWithCode` 之后追加一行。 本地便利路径(gitignored,随报告交付):`DevDocs/ops/ull-msa-run.sh` 读本地 id 文件 或 `azure-msa-app.md` 注入环境变量再起 GUI,脚本本身不含 id。
This commit is contained in:
1 parent
7ddcec4941
commit
8780f26308
8 files changed
+380
-43
No files matched your search
@@ -157,6 +157,13 @@ impl App {
|
||||
fn on_boot(&mut self) -> Task<Message> {
|
||||
let mut tasks = vec![window::latest().map(Message::WindowReady)];
|
||||
|
||||
// M117:启动日志一行 —— `[auth] msa client_id=configured|missing source=env|build|none`。
|
||||
// 判据(配没配 + 从哪来)在 `core::auth::microsoft::client_id_status()`,零网络;
|
||||
// 本 crate 不直接依赖 core,所以经 `unlucky_cli`(已是本 crate 的依赖)出面,
|
||||
// 免得 UI 侧把判据重算一遍、两份口径漂。日后看日志能一眼分辨
|
||||
// 「没配置」与「配了但登录失败」。
|
||||
eprintln!("{}", unlucky_cli::commands::msa_client_id_log_line());
|
||||
|
||||
// 主题优先级:显式 `--theme` / `--screenshot-theme` > 设置文件 > 系统。
|
||||
// 截图通道**不读设置文件**(D30 可复现:同一份代码在两台机器上要出同一张图)。
|
||||
self.apply_config_theme();
|
||||
|
||||
Reference in new issue
Block a user