We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0338df0 commit be074a4Copy full SHA for be074a4
apps/web/src/app/api/auth/invalid-session/route.ts
@@ -1,10 +1,18 @@
1
import type { NextRequest } from "next/server";
2
import { NextResponse } from "next/server";
3
+import auth from "@/lib/auth";
4
import { signOut as legacySignOut } from "@/next-auth";
5
6
export async function GET(req: NextRequest) {
7
try {
- await legacySignOut();
8
+ await Promise.all([
9
+ legacySignOut({
10
+ redirect: false,
11
+ }),
12
+ auth.api.signOut({
13
+ headers: req.headers,
14
15
+ ]);
16
} catch (error) {
17
console.error("FAILED TO SIGN OUT", error);
18
}
0 commit comments