Security
Protected Next.js areas
How to create new pages and routes that are protected.
Protected Next.js pages and api routes
- The
app_admin
folder is only accessible to application admins. Hence all pages which start with the routeapp_admin
are only accessible to app admins. - The
dashboard
route ,setting
routes,organization
routes are all only accessible to logged in users. - Other pages are public.
Creating new pags
- To create pages only accessible to logged in users, create them within the
(authenticated-pages)/(user-pages)
folders. This will make them available to all pages including app_admins. - To create pages only accessible to app_admin users, create them within the
(authenticated-users)/(app_admin)
folder. (external-pages)
are available to logged out users as well.(login-pages)
should contain all authentication related pages such as login, signup etc.