From b7c83903ca1e5530f4f31e18449b163e8f610677 Mon Sep 17 00:00:00 2001 From: ypsdf1 Date: Fri, 17 Jul 2026 11:15:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DMicrosoft=20OAuth=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E8=B7=AF=E7=94=B1=EF=BC=9A=E8=87=AA=E5=8A=A8=E6=A3=80?= =?UTF-8?q?=E6=B5=8Bcode+state=E5=8F=82=E6=95=B0=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E5=88=B0callback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/minecraft_auth.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/api/minecraft_auth.php b/api/minecraft_auth.php index ff985cf..8a68415 100644 --- a/api/minecraft_auth.php +++ b/api/minecraft_auth.php @@ -373,7 +373,16 @@ function completeAuthFlow($code) { // Action处理 // ==================================================================== -$action = getParam('action'); +// ★ 检测Microsoft OAuth回调(带code+state,没有action参数) +$code = getParam('code'); +$state = getParam('state'); +if (!empty($code) && !empty($state)) { + // 自动路由到callback处理 + $action = 'callback'; +} else { + $action = getParam('action'); +} + $db = getDb(); ensureTable($db);