From 3e39dfae33077da512b1898e97313badeb8fd401 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Wed, 14 Oct 2026 23:13:03 +0200 Subject: [PATCH] Launcher: a development-build override of the Microsoft endpoint, for the sign-in panel HORIZON_MSA_MICROSOFT_ENDPOINT (debug builds only) points the device-code and token requests at a local mock, so the restyled code panel can be seen and screenshotted without Microsoft. Co-Authored-By: Claude Opus 5.5 --- launcher/src/account.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/launcher/src/account.rs b/launcher/src/account.rs index de46b729f..1b3bd42d5 100644 --- a/launcher/src/account.rs +++ b/launcher/src/account.rs @@ -44,8 +44,14 @@ pub struct Endpoints { impl Endpoints { pub fn live() -> Self { + // Development builds only: `HORIZON_MSA_MICROSOFT_ENDPOINT` points the device-code and + // token requests at a local mock, to see and screenshot the sign-in panel. + let microsoft = std::env::var("HORIZON_MSA_MICROSOFT_ENDPOINT") + .ok() + .filter(|_| cfg!(debug_assertions)) + .unwrap_or_else(|| "https://login.microsoftonline.com/consumers/oauth2/v2.0".into()); Self { - microsoft: "https://login.microsoftonline.com/consumers/oauth2/v2.0".into(), + microsoft, xbox_user: "https://user.auth.xboxlive.com/user/authenticate".into(), xsts: "https://xsts.auth.xboxlive.com/xsts/authorize".into(), minecraft: "https://api.minecraftservices.com".into(),