rp
11/01/2021, 8:10 PMjs
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>
)
}