@lvce-editor/auth-worker 3.13.1 → 3.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authWorkerMain.js +2 -1
- package/package.json +1 -1
package/dist/authWorkerMain.js
CHANGED
|
@@ -2192,7 +2192,8 @@ const getAccessToken = async (options = {}, refreshTokens = refreshOidcTokens, n
|
|
|
2192
2192
|
const [clientId, refreshToken] = await Promise.all([getStoredOidcClientId(), getPersistentAuthValue('refreshToken')]);
|
|
2193
2193
|
const backendUrl = getAuthBackendUrl();
|
|
2194
2194
|
if (!backendUrl || !clientId || !refreshToken) {
|
|
2195
|
-
|
|
2195
|
+
const expiresAt = Number(accessTokenExpiresAt);
|
|
2196
|
+
return accessTokenExpiresAt && Number.isFinite(expiresAt) && expiresAt <= now ? '' : accessToken;
|
|
2196
2197
|
}
|
|
2197
2198
|
const refreshedTokens = await refreshTokens(backendUrl, clientId, refreshToken);
|
|
2198
2199
|
const expiresAt = getAccessTokenExpiresAt(refreshedTokens.expiresIn, now);
|