fix: fallback to signed session payload when DB user row is missing
Some checks are pending
CI - Production Readiness / Verify (push) Waiting to run
Some checks are pending
CI - Production Readiness / Verify (push) Waiting to run
This commit is contained in:
12
lib/auth.ts
12
lib/auth.ts
@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user