Merged PR 2315: Auth stabilistatiion and hardening

Related work items: #23020
This commit is contained in:
Robert Bond
2026-05-14 08:55:49 +00:00
parent d295a507ac
commit d0b2fd077a
41 changed files with 1462 additions and 418 deletions
+4 -8
View File
@@ -3,23 +3,19 @@ import { signOut } from "next-auth/react";
import useTranslation from "next-translate/useTranslation";
import Head from "next/head";
import Link from "next/link";
import { destroyCookie } from "nookies";
import { useRouter } from "next/router";
import CookieBanner from "../components/cookieBanner";
import Footer from "../components/footer";
import Header from "../components/header";
import { performPortalSignOut } from "../lib/auth/sessionClient";
const FourOhFour = (props) => {
let { t, lang } = useTranslation();
const { footerLinks, pages } = props;
const { locale } = useRouter();
const handleLogout = () => {
console.info("////////////\n" + "logout" + "\n////////////");
window.localStorage.clear(),
destroyCookie(null, "next-auth.csrf-token", { path: "/" }),
destroyCookie(null, "next-auth.callback-url", { path: "/" }),
destroyCookie(null, "pedw_locale", { path: "/" }),
destroyCookie(null, "pinsUser", { path: "/" }),
signOut({ callbackUrl: "/" });
performPortalSignOut({ locale, callbackUrl: "/", signOutFn: signOut });
};
return (