Skip to content

Commit 9479d37

Browse files
committed
fix: token provider correctly checks token validity
1 parent 73f700a commit 9479d37

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/sdk/src/auth/token-provider.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,7 @@ export class CachedTokenProvider extends TokenProvider {
6767
const existingToken = this.getCachedToken();
6868
const subject = this.subject.toString();
6969

70-
if (
71-
existingToken &&
72-
this.tokenValidator.canValidate(existingToken.header) &&
73-
this.tokenValidator.isSignatureValid(existingToken)
74-
) {
70+
if (existingToken && this.tokenValidator.isValid(existingToken)) {
7571
return existingToken;
7672
}
7773
const existingDelegatePromise = this.delegateGetPromises[subject];

0 commit comments

Comments
 (0)