2023-08-25 07:11:33 +00:00
|
|
|
"use client";
|
|
|
|
|
|
2024-12-13 16:37:20 +01:00
|
|
|
import { useEffect } from "react";
|
2023-08-25 07:11:33 +00:00
|
|
|
import { signOut } from "next-auth/react";
|
|
|
|
|
|
|
|
|
|
export default function Page() {
|
2024-12-13 16:37:20 +01:00
|
|
|
useEffect(() => {
|
|
|
|
|
const multistepSignOut = async () => {
|
|
|
|
|
const response = await fetch("/api/logout", {
|
|
|
|
|
method: "POST",
|
|
|
|
|
headers: { "Content-Type": "application/json" },
|
|
|
|
|
credentials: "same-origin",
|
|
|
|
|
});
|
2025-03-25 10:05:52 +01:00
|
|
|
signOut({ callbackUrl: "/link/login" });
|
2024-12-13 16:37:20 +01:00
|
|
|
};
|
|
|
|
|
multistepSignOut();
|
|
|
|
|
}, []);
|
2023-08-25 07:11:33 +00:00
|
|
|
|
|
|
|
|
return <div />;
|
|
|
|
|
}
|