Installation
Add the lib to your dependencies
npm install oidc-spayarn add oidc-spapnpm add oidc-spabun add oidc-spaEditing your App entrypoint
mv src/main.tsx src/main.lazy.tsximport { oidcEarlyInit } from "oidc-spa/entrypoint";
const { shouldLoadApp } = oidcEarlyInit({
freezeFetch: true,
freezeXMLHttpRequest: true
});
if (shouldLoadApp) {
import("./main.lazy");
}mv src/index.tsx src/index.lazy.tsximport { oidcEarlyInit } from "oidc-spa/entrypoint";
const { shouldLoadApp } = oidcEarlyInit({
freezeFetch: true,
freezeXMLHttpRequest: true
});
if (shouldLoadApp) {
import("./index.lazy");
}Last updated
Was this helpful?