React Server Component Usage

/app/server-example/page.tsx

This page is server-rendered as a React Server Component. It gets the session data on the server using auth() method.


const session = await auth();import {auth} from "auth";
Not Authorized!

No session data, please Sign In first.