Logging out with remix-auth
The easiest way to log a user out is to destroy their session on the server
In your logout action
js
return redirect("/", { headers: { "Set-Cookie": await destroySession(session), },})
The easiest way to log a user out is to destroy their session on the server
In your logout action
return redirect("/", { headers: { "Set-Cookie": await destroySession(session), },})
Hey there! I'm a developer, designer, and digital nomad building cool things with Remix, and I'm also writing Moulton, the Remix Community Newsletter
About once per month, I send an email with:
Stay up to date with everything in the Remix community by entering your email below.