@workos-inc/authkit-js
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -635,3 +635,4 @@ "use strict"; | ||
const LEEWAY = 10 * 1e3; | ||
return expiresAt < Date.now() - LEEWAY; | ||
const refreshTime = expiresAt - LEEWAY; | ||
return refreshTime < Date.now(); | ||
} | ||
@@ -638,0 +639,0 @@ return false; |
{ | ||
"name": "@workos-inc/authkit-js", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "AuthKit SDK", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -77,5 +77,6 @@ import { CreateClientOptions, User } from "./interfaces"; | ||
// TODO: is this configurable? | ||
// TODO: should LEEWAY be configurable? | ||
const LEEWAY = 10 * 1000; // 10 seconds | ||
return expiresAt < Date.now() - LEEWAY; | ||
const refreshTime = expiresAt - LEEWAY; | ||
return refreshTime < Date.now(); | ||
} | ||
@@ -82,0 +83,0 @@ return false; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
189500
2660