How can I include authentication when making fetch calls? I’m not receiving session information in the API route.
page.tsx
export default async function page() {
const response = await fetch(`/api/module`);
}
/api/module/route.ts
import { auth } from "@/auth"
export async function GET(request: NextRequest, response: NextRequest) {
// session is null
const session = await auth();
}