Skip to content

Commit

Permalink
Fix expiration token date which return always NaN (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
damsdev1 authored May 21, 2022
1 parent 0a80a3b commit 2e1ab3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/assets/js/authmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ async function validateSelectedMojangAccount(){
async function validateSelectedMicrosoftAccount(){
const current = ConfigManager.getSelectedAccount()
const now = new Date().getTime()
const mcExpiresAt = Date.parse(current.expiresAt)
const mcExpiresAt = current.expiresAt
const mcExpired = now >= mcExpiresAt

if(!mcExpired) {
Expand All @@ -254,7 +254,7 @@ async function validateSelectedMicrosoftAccount(){

// MC token expired. Check MS token.

const msExpiresAt = Date.parse(current.microsoft.expires_at)
const msExpiresAt = current.microsoft.expires_at
const msExpired = now >= msExpiresAt

if(msExpired) {
Expand Down Expand Up @@ -312,4 +312,4 @@ exports.validateSelected = async function(){
return await validateSelectedMojangAccount()
}

}
}

0 comments on commit 2e1ab3c

Please sign in to comment.