Skip to content

Commit b909a5e

Browse files
remove IAT and recievedAt checks for Oauth Tokens - assume that if we are saving, then we should save (#267)
1 parent 90a6c15 commit b909a5e

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/atlclients/authStore.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,6 @@ export class CredentialManager implements Disposable {
7575

7676
const existingInfo = await this.getAuthInfo(site, false);
7777

78-
if (isOAuthInfo(existingInfo) && isOAuthInfo(info)) {
79-
const effectiveExistingIat = existingInfo.iat ?? 0;
80-
const effectiveNewIat = info.iat ?? 0;
81-
if (effectiveExistingIat > effectiveNewIat) {
82-
Logger.debug(`Not replacing credentials because the existing credentials have a later iat.`);
83-
return;
84-
}
85-
86-
if (effectiveExistingIat === effectiveNewIat && existingInfo.recievedAt > info.recievedAt) {
87-
Logger.debug(
88-
`Not replacing credentials because the existing credentials have were received at a later time (despite having the same iat).`,
89-
);
90-
return;
91-
}
92-
}
93-
9478
this._memStore.set(site.product.key, productAuths.set(site.credentialId, info));
9579

9680
const hasNewInfo =

0 commit comments

Comments
 (0)