Files
web/utils/clientSession.ts
2025-02-14 14:20:54 +01:00

15 lines
323 B
TypeScript

import type { Session } from "next-auth"
export function isValidClientSession(session: Session | null) {
if (!session) {
console.log("No session available (user not authenticated).")
return false
}
if (session.error) {
console.log(`Session error: ${session.error}`)
return false
}
return true
}