fix: fallback to signed session payload when DB user row is missing
Some checks are pending
CI - Production Readiness / Verify (push) Waiting to run

This commit is contained in:
Wira Basalamah
2026-04-21 13:39:05 +07:00
parent 90f794bfe2
commit c84ce90fcf

View File

@ -269,7 +269,17 @@ export async function getSession() {
}); });
if (!user) { if (!user) {
return null; return {
userId: parsed.userId,
fullName: "User",
email: "",
role: parsed.role,
tenantId: parsed.tenantId,
tenantName: parsed.tenantId,
extraPermissions: [],
issuedAt: parsed.issuedAt,
expiresAt: parsed.expiresAt
};
} }
return { return {