diff --git a/examples/auth0/pages/advanced/ssr-profile.js b/examples/auth0/pages/advanced/ssr-profile.js index 84d96d4dbee4c..bbe88c59c751c 100644 --- a/examples/auth0/pages/advanced/ssr-profile.js +++ b/examples/auth0/pages/advanced/ssr-profile.js @@ -21,7 +21,7 @@ export async function getServerSideProps({ req, res }) { // Here you can check authentication status directly before rendering the page, // however the page would be a serverless function, which is more expensive and // slower than a static page with client side authentication - const session = await auth0.getSession(req) + const session = await auth0.getSession(req, res) if (!session || !session.user) { res.writeHead(302, {