@mikandev/next-discord-auth 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,19 +27,11 @@ export const signIn = async () => {
27
27
  return redirect(signInURL);
28
28
  };
29
29
  export const signOut = async () => {
30
- const config = getGlobalConfig();
31
30
  const cookieStore = await cookies();
32
31
  const token = cookieStore.get("AUTH_SESSION")?.value;
33
32
  if (!token) {
34
33
  return NextResponse.json({ message: "Not signed in" }, { status: 401 });
35
34
  }
36
- try {
37
- jwt.verify(token, config.jwtSecret);
38
- }
39
- catch {
40
- return NextResponse.json({ message: "Invalid session" }, { status: 401 });
41
- }
42
- const response = NextResponse.json({ message: "Signed out successfully" }, { status: 200 });
43
- response.cookies.delete("AUTH_SESSION");
44
- return response;
35
+ cookieStore.delete("AUTH_SESSION");
36
+ return NextResponse.json({ message: "Signed out successfully" }, { status: 200 });
45
37
  };
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "main": "dist/index.js",
7
7
  "files": ["dist"],
8
8
  "license": "WTFPL",
9
- "version": "0.1.4",
9
+ "version": "0.1.5",
10
10
  "type": "module",
11
11
  "repository": {
12
12
  "type": "git",