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