hi, is it expected that using Supertokens with next.js disables static optimization entirely? Our entire app is protected, so we get this error in the Vercel logs:
Copy code
Warning: You have opted-out of Automatic Static Optimization due to `getInitialProps` in `pages/_app`. This does not opt-out pages with `getStaticProps`
This causes some strange downstream issues for us, because now everything in our client needs to get rendered via serverless functions
r
rp_st
06/20/2023, 6:37 PM
hey @kushal5266 when you say protected your entire app, does that mean just wrapping it with the supertokensWrapper component or the SessionAuth component?
k
kushal5266
06/20/2023, 6:47 PM
both!
r
rp_st
06/20/2023, 6:48 PM
Why did you need to define
getInitialProps
on the pages/_app file? That seems to be causing the issue based on the message
k
kushal5266
06/20/2023, 6:51 PM
we don't have
getInitialProps
in our app file, I assumed that was coming from the Supertokens wrapper?
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).