Made it so users have to verify their e-mail starting to use the application

This commit is contained in:
Tiago Ribeiro
2023-09-07 12:45:31 +01:00
parent 5211e92c65
commit f91cd0ca63
17 changed files with 375 additions and 181 deletions

View File

@@ -23,7 +23,7 @@ import {BsBook, BsHeadphones, BsMegaphone, BsPen} from "react-icons/bs";
export const getServerSideProps = withIronSessionSsr(({req, res}) => {
const user = req.session.user;
if (!user) {
if (!user || !user.isVerified) {
res.setHeader("location", "/login");
res.statusCode = 302;
res.end();