From bbca2d14c950099fcb414b5e1f56445a9d7f4bc2 Mon Sep 17 00:00:00 2001 From: zoujing Date: Sun, 10 May 2026 12:19:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=99=BB=E5=BD=95=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useGoLogin.js | 7 ++++++- src/manager/LoginManager.js | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/hooks/useGoLogin.js b/src/hooks/useGoLogin.js index e2222a4..d546a29 100644 --- a/src/hooks/useGoLogin.js +++ b/src/hooks/useGoLogin.js @@ -98,11 +98,16 @@ export const refreshToken = () => { } const params = { - openIdCode: [openIdCode], grant_type: grant_type, clientId: clientId, scope: "server", }; + + if (provider === "apple") { + params.identityToken = openIdCode; + } else { + params.openIdCode = [openIdCode]; + } console.log("获取到的授权params:", JSON.stringify(params)); const response = await oauthToken(params); diff --git a/src/manager/LoginManager.js b/src/manager/LoginManager.js index 554a415..73aaae9 100644 --- a/src/manager/LoginManager.js +++ b/src/manager/LoginManager.js @@ -47,11 +47,17 @@ const loginAuth = (e) => { } const params = { - openIdCode: [openIdCode], grant_type: grant_type, clientId: clientId, scope: "server", }; + + if (provider === "apple") { + params.identityToken = openIdCode; + } else { + params.openIdCode = [openIdCode]; + } + console.log("获取到的授权params:", JSON.stringify(params)); const response = await oauthToken(params);