aktueller stand

This commit is contained in:
torbinus
2026-09-17 16:02:51 +02:00
parent 7e51514383
commit 065cb8b64f
295 changed files with 642342 additions and 1059 deletions
+14
View File
@@ -0,0 +1,14 @@
export const CUSTOMER_COOKIE_NAME = "customer_jwt";
export function getCustomerTokenClient(): string | null {
const match = document.cookie.match(new RegExp(`(?:^|; )${CUSTOMER_COOKIE_NAME}=([^;]*)`));
return match ? decodeURIComponent(match[1]) : null;
}
export function setCustomerTokenClient(token: string) {
document.cookie = `${CUSTOMER_COOKIE_NAME}=${encodeURIComponent(token)}; path=/; max-age=${60 * 60 * 24 * 30}; SameSite=Lax`;
}
export function clearCustomerTokenClient() {
document.cookie = `${CUSTOMER_COOKIE_NAME}=; path=/; max-age=0`;
}