diff --git a/packages/web/src/PobWindow.tsx b/packages/web/src/PobWindow.tsx index 963f24c..fcf5389 100644 --- a/packages/web/src/PobWindow.tsx +++ b/packages/web/src/PobWindow.tsx @@ -140,8 +140,10 @@ export default function PobWindow(props: { const [_token, setToken] = useState(); useEffect(() => { async function getToken() { - const t = await auth0.getAccessTokenSilently(); - setToken(t); + if (auth0.isAuthenticated) { + const t = await auth0.getAccessTokenSilently(); + setToken(t); + } } getToken(); }, [auth0]); diff --git a/packages/web/src/main.tsx b/packages/web/src/main.tsx index 5ab39fb..58551af 100644 --- a/packages/web/src/main.tsx +++ b/packages/web/src/main.tsx @@ -31,9 +31,12 @@ ReactDOM.createRoot(document.getElementById("root")!).render(