clear pinsuser id from cookie
This commit is contained in:
+10
-4
@@ -41,14 +41,20 @@ function Error({ statusCode }, props) {
|
||||
window.localStorage.clear(),
|
||||
destroyCookie(
|
||||
null,
|
||||
"next-auth.csrf-token"
|
||||
"next-auth.csrf-token",
|
||||
{ path: "/" }
|
||||
),
|
||||
destroyCookie(
|
||||
null,
|
||||
"next-auth.callback-url"
|
||||
"next-auth.callback-url",
|
||||
{ path: "/" }
|
||||
),
|
||||
destroyCookie(null, "pedw_locale"),
|
||||
destroyCookie(null, "pinsUser"),
|
||||
destroyCookie(null, "pedw_locale", {
|
||||
path: "/",
|
||||
}),
|
||||
destroyCookie(null, "pinsUser", {
|
||||
path: "/",
|
||||
}),
|
||||
session != null
|
||||
? signOut({
|
||||
callbackUrl: "/",
|
||||
|
||||
+11
-4
@@ -42,16 +42,23 @@ function Error({ statusCode }, props) {
|
||||
className="govuk-link"
|
||||
onClick={() => {
|
||||
window.localStorage.clear(),
|
||||
window.localStorage.clear(),
|
||||
destroyCookie(
|
||||
null,
|
||||
"next-auth.csrf-token"
|
||||
"next-auth.csrf-token",
|
||||
{ path: "/" }
|
||||
),
|
||||
destroyCookie(
|
||||
null,
|
||||
"next-auth.callback-url"
|
||||
"next-auth.callback-url",
|
||||
{ path: "/" }
|
||||
),
|
||||
destroyCookie(null, "pedw_locale"),
|
||||
destroyCookie(null, "pinsUser"),
|
||||
destroyCookie(null, "pedw_locale", {
|
||||
path: "/",
|
||||
}),
|
||||
destroyCookie(null, "pinsUser", {
|
||||
path: "/",
|
||||
}),
|
||||
session != null
|
||||
? signOut({
|
||||
callbackUrl: "/",
|
||||
|
||||
@@ -15,10 +15,10 @@ const FourOhFour = (props) => {
|
||||
const handleLogout = () => {
|
||||
console.info("////////////\n" + "logout" + "\n////////////");
|
||||
window.localStorage.clear(),
|
||||
destroyCookie(null, "next-auth.csrf-token"),
|
||||
destroyCookie(null, "next-auth.callback-url"),
|
||||
destroyCookie(null, "pedw_locale"),
|
||||
destroyCookie(null, "pinsUser"),
|
||||
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: "/" });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user