updateAuthAccountWithMicrosoftに名前を変更
This commit is contained in:
parent
e8ab6585db
commit
0708b8fa7b
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user