https://supertokens.com/ logo
#support-questions
Title
# support-questions
t

TELYA

04/09/2022, 3:50 PM
Hey, I curious if someone is experienced an infinite loop of redirects (Framework: Next.js) when EmailPasswordAuth is used ?
Copy code
typescript
const EmailPasswordAuthNoSSR = dynamic(
  new Promise((res) => res(EmailPasswordAuth)) as any,
  { ssr: false }
);

export default function Home() {
  return (
    <EmailPasswordAuthNoSSR>
      <div>test</div>
    </EmailPasswordAuthNoSSR>
  );
}
I init the SupertokensReact inside _app.tsx
Copy code
typescript
if (typeof window !== "undefined") {
  SuperTokensReact.init({
    appInfo: {
      appName: "test-app",
      apiDomain: "http://localhost:3001/",
      websiteDomain: "http://localhost:3000",
      apiBasePath: "/auth",
      websiteBasePath: "/"
    },
    recipeList: [
      EmailPasswordReact.init(),
      SessionReact.init()
    ]
  });
}
Am i missed some configuration or just dumb ? 😄