@dotinc/bouncer-admin
Version:
Bouncer Admin UI
10 lines (8 loc) • 387 B
text/typescript
import SuperTokens from "supertokens-auth-react";
import { frontendConfig, FrontendConfigProps } from "../config/frontend";
export const initFrontend = (config?: FrontendConfigProps) => {
if (typeof window !== "undefined") {
// we only want to call this init function on the frontend, so we check typeof window !== 'undefined'
SuperTokens.init(frontendConfig(config));
}
};