Skip to content

Commit

Permalink
fix: ms auth token always being seen as invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHillcox committed Jun 11, 2024
1 parent ae19929 commit 663bf83
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public static boolean isValid(AccountProfile profile) {
return false;
}

// The token is valid if it expires in more than 1 hour
boolean valid = Instant.now().getEpochSecond() < profile.msAuth.liveExpiresAt - (60 * 60);
// The token is valid if it expires in less than 30 minutes
boolean valid = Instant.now().getEpochSecond() < profile.msAuth.liveExpiresAt - (30 * 60);
int mcTokenExpires = extractExpiresFromToken(profile.msAuth.minecraftToken);
if (mcTokenExpires != -1) {
// The mc token is valid if it expires in more than 6 hour
Expand Down

0 comments on commit 663bf83

Please sign in to comment.