Skip to content

Commit 88e36aa

Browse files
committed
clearSession -> clearCookie
1 parent f6e54b1 commit 88e36aa

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/app/components/sign-in-button.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import {
2-
clearSessionAndRedirect,
3-
getAuthorizationUrl,
4-
getUser,
5-
} from "../../auth";
1+
import { clearCookie, getAuthorizationUrl, getUser } from "../../auth";
62
import { Button, Flex } from "@radix-ui/themes";
73

84
export async function SignInButton({ large }: { large?: boolean }) {
@@ -15,7 +11,7 @@ export async function SignInButton({ large }: { large?: boolean }) {
1511
<form
1612
action={async () => {
1713
"use server";
18-
await clearSessionAndRedirect();
14+
await clearCookie();
1915
}}
2016
>
2117
<Button type="submit" size={large ? "3" : "2"}>

src/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export async function getUser(): Promise<{
6464
return { isAuthenticated: false };
6565
}
6666

67-
export async function clearSessionAndRedirect() {
67+
export async function clearCookie() {
6868
cookies().delete("token");
6969
redirect("/");
7070
}

0 commit comments

Comments
 (0)