updatd logout links and login flow for nextauth
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user