export const getSession = async () => {
const headersCopy = await headers();
for (const [key, value] of headersCopy.entries()) {
console.log(`${key}: ${value}`); // verify that cookies are in header
}
const session = await auth.api.getSession({
headers: headersCopy,
});
return session;
}
export const getSession = async () => {
const headersCopy = await headers();
for (const [key, value] of headersCopy.entries()) {
console.log(`${key}: ${value}`); // verify that cookies are in header
}
const session = await auth.api.getSession({
headers: headersCopy,
});
return session;
}