- Which SDK this is regarding: nextjs-auth0
- SDK Version: 1.6.1
- Platform Version: NextJS 12.0.7
Hi,
Following Auth0 SDK docs we can protect each NextJS page by wrapping them with the withPageAuthRequired, like this:
// pages/profile.js
import { withPageAuthRequired } from '@auth0/nextjs-auth0';
export default withPageAuthRequired(function Profile({ user }) {
return <div>Hello {user.name}</div>;
});
Is there a way to protect all the pages at once instead of using the withPageAuthRequired on each page?