Jacob Paris
← Back to all content

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

return redirect("/", {
headers: {
"Set-Cookie": await destroySession(session),
Professional headshot

Hi, I'm Jacob

Hey there! I'm a developer, designer, and digital nomad with a background in lean manufacturing.

About once per month, I send an email with new guides, new blog posts, and sneak peeks of what's coming next.

Everyone who subscribes gets access to the source code for this website and every example project for all my tutorials.

Stay up to date with everything I'm working on by entering your email below.

Unsubscribe at any time.