import { headers } from "next/headers";
import { authClient } from '@/lib/auth';
export default async function Home() {
const hdrs = await headers();
const sess = await authClient.getSession({
fetchOptions: {
headers: await headers(),
}
})
console.log("Session:", sess);
return (
<main className="flex min-h-[calc(100dvh-68px)] flex-col items-center ">
///
<pre>
{JSON.stringify(sess, null, 2)}
{JSON.stringify(hdrs, null, 2)}
</pre>
</main>
);
}
import { headers } from "next/headers";
import { authClient } from '@/lib/auth';
export default async function Home() {
const hdrs = await headers();
const sess = await authClient.getSession({
fetchOptions: {
headers: await headers(),
}
})
console.log("Session:", sess);
return (
<main className="flex min-h-[calc(100dvh-68px)] flex-col items-center ">
///
<pre>
{JSON.stringify(sess, null, 2)}
{JSON.stringify(hdrs, null, 2)}
</pre>
</main>
);
}