Create monorepo from known-good production state

This commit is contained in:
makearmy 2026-07-09 21:07:34 -04:00
commit c034824338
651 changed files with 120469 additions and 0 deletions

15
app/lib/jwt.ts Normal file
View file

@ -0,0 +1,15 @@
// lib/jwt.ts
export function jwtExp(token?: string | null): number | null {
if (!token) return null;
try {
const payload = JSON.parse(Buffer.from(token.split(".")[1], "base64").toString("utf8"));
return typeof payload?.exp === "number" ? payload.exp : null;
} catch {
return null;
}
}
export function isJwtValid(token?: string | null): boolean {
const exp = jwtExp(token);
return !!exp && exp * 1000 > Date.now();
}