signout from server in next js 13

can anyone tell me how can i signout from server in next auth? signOut() is not working and below code is also not working(i am using this inside server action
cookies().set({
name: "next-auth.csrf-token",
maxAge: 0,
value: "",
httpOnly: true,
sameSite: "lax",
priority: "medium",
domain: "/",
});
cookies().set({
name: "next-auth.callback-url",
maxAge: 0,
value: "",
sameSite: "lax",
priority: "medium",
httpOnly: true,
domain: "/",
});
cookies().set({
name: "next-auth.session-token",
maxAge: 0,
value: "",
sameSite: "lax",
priority: "medium",

httpOnly: true,

domain: "/",
});
cookies().set({
name: "next-auth.csrf-token",
maxAge: 0,
value: "",
httpOnly: true,
sameSite: "lax",
priority: "medium",
domain: "/",
});
cookies().set({
name: "next-auth.callback-url",
maxAge: 0,
value: "",
sameSite: "lax",
priority: "medium",
httpOnly: true,
domain: "/",
});
cookies().set({
name: "next-auth.session-token",
maxAge: 0,
value: "",
sameSite: "lax",
priority: "medium",

httpOnly: true,

domain: "/",
});
G
Grey311d ago
set it's expiry to an old timestamp (as old as yesterday or older, like 1970-01-01) as well so it expires
G
Grey311d ago
read the docs ^
P
pradeep311d ago
thank you it start working
Want results from more Discord servers?
Add your server
More Posts
Updated data not being fetched in production.Hey guys so i just made a web app which uses prisma / planetscale and tanstack query. I have been tSome good old system designHello everyone, how you doing ? So I want to create a little app that consists of 2 main parts sysPages or App ?I'm going to create a production project with nextjs, but confused, What is the best option pages/ oWait for ISR Revalidation (rather than showing stale data)Hey guys! I had a quick question about using ISR in Next.js (app router) with Vercel. As outlined byWhat about Panda CSS?Hey there! I can't find any talk about using Panda CSS over Tailwind on this Discord. I would like tNextAuth sign in function not working properlyhey, i have nextauth set up with `credentialsProvider` on, i have the following onClick on a button:Fetching only onceso i have an authToken being stored in the local storage and i want to send it in a POST request eacimport mysql into planetscaleHas anyone imported a database from your local pc into planetscale? With regard to the hostname whatPromise.all is not working in transaction in drizzleCan anyone tell me why this transaction is not working in drizzle? it does not throwing any error bshortest import path with eslint + tsconfig.json pathsIs there any way to configure eslint (I am using `eslint-plugin-import` + `eslint-import-resolver-tyGitHub workflow doesnt runI have this PR here which requires the CI to pass but it doesnt run. Do I miss something or have I sgetServerAuthSession returning null in productionI have absolutely no clue how that is happening because I've implemented the same solution in anothe