Tutorials
Private Pages
At the end of this tutorial, you’ll know how to add new private pages to your application.
Convention
All pages inside
/apps/web/app/app, folder are private by default.All pages inside /apps/web/app/home folder are public by default.
So, if you want to add a new private page to your application, make sure to add it inside
/apps/web/app/app folder.How TurboStack ensures authentication?
We created a NextJS Middleware to ensure that all pages inside app
folder need an authentified user to be available.
Here is the code for our AppMiddleware
:
apps/web/lib/middleware/app.ts