@accounts/client
Advanced tools
Comparing version 0.16.0 to 0.17.0
@@ -122,3 +122,3 @@ "use strict"; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var tokens, refreshedSession, err_1; | ||
var tokens, isAccessTokenExpired, isRefreshTokenExpired, refreshedSession, err_1; | ||
return tslib_1.__generator(this, function (_a) { | ||
@@ -133,3 +133,5 @@ switch (_a.label) { | ||
_a.trys.push([2, 8, , 10]); | ||
if (!(utils_1.isTokenExpired(tokens.accessToken) && !utils_1.isTokenExpired(tokens.refreshToken))) return [3 /*break*/, 5]; | ||
isAccessTokenExpired = utils_1.isTokenExpired(tokens.accessToken); | ||
isRefreshTokenExpired = utils_1.isTokenExpired(tokens.refreshToken); | ||
if (!(isAccessTokenExpired && !isRefreshTokenExpired)) return [3 /*break*/, 5]; | ||
return [4 /*yield*/, this.transport.refreshTokens(tokens.accessToken, tokens.refreshToken)]; | ||
@@ -143,3 +145,3 @@ case 3: | ||
case 5: | ||
if (!utils_1.isTokenExpired(tokens.refreshToken)) return [3 /*break*/, 7]; | ||
if (!isRefreshTokenExpired) return [3 /*break*/, 7]; | ||
// Refresh token is expired, user must sign back in | ||
@@ -146,0 +148,0 @@ return [4 /*yield*/, this.clearTokens()]; |
{ | ||
"name": "@accounts/client", | ||
"version": "0.16.0", | ||
"version": "0.17.0", | ||
"description": "Fullstack authentication and accounts-management", | ||
@@ -46,3 +46,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@types/jest": "24.0.15", | ||
"@types/jest": "24.0.16", | ||
"@types/jwt-decode": "2.2.1", | ||
@@ -57,3 +57,3 @@ "@types/node": "12.6.8", | ||
"dependencies": { | ||
"@accounts/types": "^0.16.0", | ||
"@accounts/types": "^0.17.0", | ||
"jwt-decode": "2.2.0", | ||
@@ -60,0 +60,0 @@ "tslib": "1.10.0" |
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
24440
406
+ Added@accounts/types@0.17.0(transitive)
- Removed@accounts/types@0.16.0(transitive)
Updated@accounts/types@^0.17.0