refactor: update authentication flow to use NextAuth, replace better-auth with axios for API calls, and clean up unused code

This commit is contained in:
2025-03-23 15:07:03 +05:00
parent 0fd269df31
commit 020d74c5e2
23 changed files with 1269 additions and 1271 deletions

View File

@ -10,7 +10,7 @@ import {
SidebarProvider,
SidebarTrigger,
} from "@/components/ui/sidebar";
import { auth } from "@/lib/auth";
import { auth } from "@/app/auth";
import prisma from "@/lib/db";
import { headers } from "next/headers";
import { AccountPopover } from "./account-popver";
@ -19,7 +19,7 @@ export async function ApplicationLayout({
children,
}: { children: React.ReactNode }) {
const session = await auth.api.getSession({
headers: await headers()
headers: await headers(),
});
const billFormula = await prisma.billFormula.findFirst();
const user = await prisma.user.findFirst({