Skip to content

Commit 86501e8

Browse files
fixed is identity available
1 parent c4061fe commit 86501e8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sdkBase.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,11 @@ export abstract class SdkBase {
190190

191191
public isIdentityAvailable() {
192192
const identity = this._identity ?? this.getIdentityNoInit();
193+
// available if identity exists and has not expired or if there active requests
193194
return (
194-
(identity && !hasExpired && !this.temporarilyUnavailable(identity)) ||
195+
(identity &&
196+
!hasExpired(identity.refresh_expires) &&
197+
!this.temporarilyUnavailable(identity)) ||
195198
this._apiClient?.hasActiveRequests()
196199
);
197200
}

0 commit comments

Comments
 (0)