Skip to content

Commit dbfc3cf

Browse files
committed
fix: Proper cookie invalidation
1 parent 5e7e809 commit dbfc3cf

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/server-actions.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,5 @@ export const signOut = async (): Promise<NextResponse> => {
4242
return NextResponse.json({ message: "Invalid session" }, { status: 401 });
4343
}
4444

45-
const response = NextResponse.json(
46-
{ message: "Signed out successfully" },
47-
{ status: 200 }
48-
);
49-
response.cookies.delete("AUTH_SESSION");
50-
return response;
45+
cookieStore.delete("AUTH_SESSION");
5146
};

0 commit comments

Comments
 (0)