Skip to content

Commit

Permalink
Clear cache if URL param for trial present
Browse files Browse the repository at this point in the history
  • Loading branch information
florkbr committed Oct 5, 2023
1 parent 5494633 commit 9b93d5e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/jwt/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,17 @@ export default async (token: SSOParsedToken): Promise<ChromeUser | void> => {
if (isITLessCognito) {
// cogToken = await getTokenWithAuthorizationCode();
}
const params = new URLSearchParams(getWindow().location.search);
const opts = {
cache: {
override: params.has('trial_activated', 'true'),
},
};
try {
if (user.identity.org_id) {
data = isITLessCognito
? ((await serviceAPI.servicesGet()) as unknown as typeof data)
: ((await serviceAPI.servicesGet()) as unknown as typeof data);
? ((await serviceAPI.servicesGet(opts)) as unknown as typeof data)
: ((await serviceAPI.servicesGet(opts)) as unknown as typeof data);
} else {
console.log('Cannot call entitlements API, no account number');
}
Expand Down

0 comments on commit 9b93d5e

Please sign in to comment.