Private page
Once user is authentified, you can build private routes like a user dashboard, account, etc.
If you want to make protected API calls, follow this tutorial.
The layout.js in /dashboard ensures any pages & subpages are private. If the user is not authenticated, he'll be redirected to the login page (see auth in config.js)
Here's an example of a simple user dashboard showing private user data in a server component:
Last updated on