TanStackT
TanStack11mo ago
4 replies
awake-maroon

Is deleteCookie blocking?

import { deleteCookie, getCookie, setCookie } from "@tanstack/start/server";

if (sessionCookie) {
    // Kill the session cookie for this user
    console.log("Going to delete the session cookie!!");
    const idToken = await serverAuth.verifySessionCookie(sessionCookie);
    await serverAuth.revokeRefreshTokens(idToken.uid);
    deleteCookie("session");

    if (getCookie("session")) {
      console.error("Failed to delete session cookie");
    }
  }


Every time I get the console error for "Failed to delete session cookie"
Was this page helpful?