diff --git a/frontend/app/api_client.ts b/frontend/app/api_client.ts index 431cea014..0ddd88413 100644 --- a/frontend/app/api_client.ts +++ b/frontend/app/api_client.ts @@ -58,13 +58,17 @@ export default class APIClient { private onUpdateJwt: (data: { jwt?: string, spotJwt?: string }) => void; private refreshingTokenPromise: Promise | null = null; - constructor() { + constructor(jwt?: string | null) { this.init = { headers: new Headers({ Accept: 'application/json', 'Content-Type': 'application/json' }) }; + + if (jwt) { + this.setJwt(jwt); + } } setJwt(jwt: string | null): void { diff --git a/frontend/app/components/Session/LivePlayer.tsx b/frontend/app/components/Session/LivePlayer.tsx index 00dbad925..2ecc530ae 100644 --- a/frontend/app/components/Session/LivePlayer.tsx +++ b/frontend/app/components/Session/LivePlayer.tsx @@ -55,7 +55,7 @@ function LivePlayer({ }, }; if (isEnterprise) { - new APIClient() + new APIClient(userStore.jwt) .get('/config/assist/credentials') .then((r) => r.json()) .then(({ data }) => {