general login

This commit is contained in:
oliver
2026-06-12 11:06:15 -03:00
parent f9c8f8fd8c
commit a270f60311
+2 -2
View File
@@ -2060,7 +2060,7 @@ function toast(msg, type = "info", duration = 4000) {
/* ─── Cookie helpers ───────────────────────────────────────── */
function setCookie(name, value, days) {
const expires = new Date(Date.now() + days * 864e5).toUTCString();
document.cookie = `${name}=${encodeURIComponent(value)}; expires=${expires}; path=/; SameSite=Strict`;
document.cookie = `${name}=${encodeURIComponent(value)}; expires=${expires}; path=/; domain=.derez.ai; SameSite=Lax`;
}
function getCookie(name) {
return document.cookie.split("; ").reduce((acc, c) => {
@@ -2069,7 +2069,7 @@ function getCookie(name) {
}, null);
}
function deleteCookie(name) {
document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; SameSite=Strict`;
document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=.derez.ai; SameSite=Lax`;
}
/* ─── Authenticated fetch ───────────────────────────────────── */