I seem to be getting the error:
You should not access 'res' after getServerSideProps resolves.
With the following code:
export const getServerSideProps = withPageAuthRequired({
async getServerSideProps(ctx){
// access the user session
const session = getSession(ctx.req,ctx.res);
return {props:{
customProp:'bar'
}};
}
});
This code comes directly from https://auth0.github.io/nextjs-auth0/modules/helpers_with_page_auth_required.html#withpageauthrequiredoptions
I didn't know if there was a way to get rid of this warning when implementing auth0 I'm on Next.js 12.0.4 & auth0 ^1.6.1
What would be the best way to get rid of this error?