Skip to content

Commit

Permalink
fixing issues, the refresh endpoint was doubling the expiration durat…
Browse files Browse the repository at this point in the history
…ions when hit
  • Loading branch information
rajumb0232 committed Nov 8, 2024
1 parent d4aed0b commit 9c1abe7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ public AuthResponse refreshLogin(String refreshToken, String accessToken) {
}

private long getLeftOverSeconds(long expiryDuration, Date tokenExpiration) {
return expiryDuration - ((new Date().getTime() - tokenExpiration.getTime()) / 1000);
long remainingSeconds = (tokenExpiration.getTime() - new Date().getTime()) / 1000;
return Math.max(remainingSeconds, 0);
}

@Override
Expand Down

0 comments on commit 9c1abe7

Please sign in to comment.