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

rp

11/01/2021, 8:10 PM
Have you tried doing something like this instead?
Copy code
js

import dynamic from 'next/dynamic'
import ThirdPartyEmailPassword from 'supertokens-auth-react/recipe/thirdpartyemailpassword'

const ThirdPartyEmailPasswordAuthNoSSR = dynamic(
  new Promise((res) =>
    res(ThirdPartyEmailPassword.ThirdPartyEmailPasswordAuth)
  ),
  { ssr: false }
)

export default function Home() {
  return (
    // we protect ProtectedPage by wrapping it
    // with ThirdPartyEmailPasswordAuthNoSSR

    <ThirdPartyEmailPasswordAuthNoSSR>
      <ProtectedPage />
    </ThirdPartyEmailPasswordAuthNoSSR>
  )
}