updatd logout links and login flow for nextauth

This commit is contained in:
2022-04-19 12:25:13 +01:00
parent 511a5ed98d
commit 3b1a49e561
9 changed files with 81 additions and 45 deletions
+4 -1
View File
@@ -19,6 +19,8 @@ import { useState } from "react";
import TimeOut from "../components/timeout";
import UploadFile from "./myportal/uploadFile";
import { useSession, signIn, signOut } from "next-auth/react";
const MyPortal = (props) => {
const { showFileUpload } = props;
let { t } = useTranslation();
@@ -57,7 +59,8 @@ const MyPortal = (props) => {
console.log("////////////", "\n", "logout", "\n", "//////////");
destroyCookie({}, "pinsUser"),
window.localStorage.clear(),
router.replace(props.ggLogout);
//router.replace(props.ggLogout);
signOut({ callbackUrl: "/logout" });
};
return (