Skip to content

Commit

Permalink
Hack: clear GPT LMPID provider secure signals cache on __lmpid cache …
Browse files Browse the repository at this point in the history
…refresh
  • Loading branch information
zapo committed May 17, 2023
1 parent 12fa999 commit e54e70a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/core/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ class LocalStorage {
return
}

// Invalidate the secure signals provider cache as it's unclear
// for how long the secure signals are cached and while LMPID have a 45 days lifetime receivers
// may decide to implement short PID lifetimes.
//
// HACK: Delete GPT secure signals cache directly for lmpidProvider, this is undocumented and could
// break in the future.
window.localStorage.removeItem(`_GESPSK-${lmpidProvider}`);
window.localStorage.setItem(this.lmpidKey, provider.ids?.[0]?.id ?? "");
}

Expand Down

0 comments on commit e54e70a

Please sign in to comment.