refactor: streamline authentication flow by removing unused code, replacing custom auth utilities with NextAuth, and updating session handling in components
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 5m56s

This commit is contained in:
2025-03-28 22:24:45 +05:00
parent 99c5fef748
commit ef9f032366
10 changed files with 291 additions and 323 deletions

View File

@ -1,15 +0,0 @@
"use server";
import { headers } from "next/headers";
import { cache } from "react";
import { auth } from "../app/auth";
const getCurrentUserCache = cache(async () => {
const session = await auth.api.getSession({
headers: await headers(),
});
return session?.user;
});
export async function getCurrentUser() {
return await getCurrentUserCache();
}