fixing things

This commit is contained in:
2026-01-07 16:50:10 -05:00
parent 0a0c0e313e
commit 5b0f6dba0f
7 changed files with 123 additions and 48 deletions

View File

@@ -1,6 +1,6 @@
import type { SessionConfig } from "vinxi/http";
import { env } from "~/env/server";
import { AUTH_CONFIG } from "~/config";
import { AUTH_CONFIG, expiryToSeconds } from "~/config";
/**
* Session data stored in encrypted cookie
@@ -45,7 +45,7 @@ export function getSessionCookieOptions(rememberMe: boolean) {
return {
...sessionConfig.cookieOptions,
maxAge: rememberMe
? 90 * 24 * 60 * 60 // 90 days
? expiryToSeconds(AUTH_CONFIG.REFRESH_TOKEN_EXPIRY_LONG)
: undefined // Session cookie (expires on browser close)
};
}