a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

delete both auth cookies

+15 -2
+15 -2
src/auth.ts
··· 14 14 15 15 export async function removeAuthToken() { 16 16 let c = await cookies(); 17 - let auth_cookies = c.getAll("auth_token"); 18 - auth_cookies.forEach(({ value, ...cookie }) => c.delete(cookie)); 17 + c.delete({ 18 + name: "auth_token", 19 + maxAge: 60 * 60 * 24 * 365, 20 + secure: process.env.NODE_ENV === "production", 21 + domain: isProductionDomain() ? "leaflet.pub" : undefined, 22 + httpOnly: true, 23 + sameSite: "lax", 24 + }); 25 + c.delete({ 26 + name: "auth_token", 27 + maxAge: 60 * 60 * 24 * 365, 28 + secure: process.env.NODE_ENV === "production", 29 + httpOnly: true, 30 + sameSite: "lax", 31 + }); 19 32 }