blob: 58ffdad0804c351f9eb04b05b344386e054fdfd0 (
plain)
1
2
3
4
5
6
7
8
|
import { cookies } from "next/headers";
import { Credential } from "../types/auth";
export default function getServerCredential(): Credential | null {
const credentialStr = cookies().get("credential")?.value;
return credentialStr ? JSON.parse(credentialStr) : null;
}
|