Created
December 20, 2022 13:03
-
-
Save nhattruongniit/4f3099b0de696041f26617a4894f75cb to your computer and use it in GitHub Desktop.
check-expired-refresh-token
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const now = new Date().getTime(); | |
| const OFFSET_EXPIRE_TIME = 10 * 1000, // 10s | |
| const isExpired = Boolean(expires_at && now - expires_at * 1000 > OFFSET_EXPIRE_TIME); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment