From 0708b8fa7b97ef3da38a0fee1ac45f1c19b4c142 Mon Sep 17 00:00:00 2001 From: ReyADayer Date: Mon, 1 Mar 2021 16:25:44 +0900 Subject: [PATCH] =?UTF-8?q?updateAuthAccountWithMicrosoft=E3=81=AB?= =?UTF-8?q?=E5=90=8D=E5=89=8D=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/js/authmanager.js | 4 ++-- app/assets/js/configmanager.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/js/authmanager.js b/app/assets/js/authmanager.js index 5db6f78c..0b7ae6d5 100644 --- a/app/assets/js/authmanager.js +++ b/app/assets/js/authmanager.js @@ -54,12 +54,12 @@ async function validateSelectedMicrosoft() { if (MSExpired) { const newAccessToken = await Microsoft.refreshAccessToken(current.microsoft.refresh_token) const newMCAccessToken = await Microsoft.authMinecraft(newAccessToken.access_token) - ConfigManager.updateAuthAccount(current.uuid, newMCAccessToken.access_token, newAccessToken.expires_at) + ConfigManager.updateAuthAccountWithMicrosoft(current.uuid, newMCAccessToken.access_token, newAccessToken.expires_at) ConfigManager.save() return true } const newMCAccessToken = await Microsoft.authMinecraft(current.microsoft.access_token) - ConfigManager.updateAuthAccount(current.uuid, newMCAccessToken.access_token, current.microsoft.access_token, current.microsoft.expires_at, newMCAccessToken.expires_at) + ConfigManager.updateAuthAccountWithMicrosoft(current.uuid, newMCAccessToken.access_token, current.microsoft.access_token, current.microsoft.expires_at, newMCAccessToken.expires_at) ConfigManager.save() return true diff --git a/app/assets/js/configmanager.js b/app/assets/js/configmanager.js index 6f5f91eb..6b937a5b 100644 --- a/app/assets/js/configmanager.js +++ b/app/assets/js/configmanager.js @@ -341,7 +341,7 @@ exports.updateAuthAccount = function(uuid, accessToken){ * * @returns {Object} The authenticated account object created by this action. */ -exports.updateAuthAccount = function(uuid, accessToken, msAccessToken, msRefreshToken, msExpires, mcExpires){ +exports.updateAuthAccountWithMicrosoft = function(uuid, accessToken, msAccessToken, msRefreshToken, msExpires, mcExpires){ config.authenticationDatabase[uuid].accessToken = accessToken config.authenticationDatabase[uuid].expiresAt = mcExpires config.authenticationDatabase[uuid].microsoft.access_token = msAccessToken