updated authentication on protected pages

This commit is contained in:
2023-06-05 12:00:28 +01:00
parent 3dd4525770
commit 31375a5999
20 changed files with 408 additions and 119 deletions
+15 -5
View File
@@ -162,11 +162,21 @@ export const getServerSideProps = wrapper.getServerSideProps(
let thisSession = await getSession(ctx);
console.log(
"auth sess for register :",
thisSession,
thisSession.user.email
);
// console.log(
// "auth sess for register :",
// thisSession,
// thisSession.user.email
// );
if (!thisSession) {
console.log("not has sesssion.......");
return {
redirect: {
destination: "/auth/signin",
permanent: false,
},
};
}
return {
props: {