captainbuckketsC
Denoβ€’2y agoβ€’
3 replies
captainbuckkets

Removing cookie for basic logout

I seem to be losing my mind. My logout pathway used to work, but now no matter what method I use, the cookie remains and

a) the cookie is never removed
b) the user can't actually logout as a consequence

Here is a simple pathway using both the .88 STD methods, and the Oak library

deleteCookie(response, "token")
cookies.delete("token", "");
await cookies.set("token", "",)

// response.status = 302;
// response.headers.set("Location", "/");
response.redirect("/login")
Was this page helpful?