Skip to content

Commit fefc1a3

Browse files
Jyrno42zaiste
authored andcommitted
Add token expiry check in handleRequestWithTokenRefresh
1 parent 064b259 commit fefc1a3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/SaleorAuthClient.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class SaleorAuthClient {
8383
invariant(refreshToken, "Missing refresh token in token refresh handler");
8484

8585
// the refresh already finished, proceed as normal
86-
if (this.accessToken) {
86+
if (this.accessToken && !isExpiredToken(this.accessToken)) {
8787
return this.fetchWithAuth(input, init);
8888
}
8989

0 commit comments

Comments
 (0)