diff --git a/hooks/useAuth.ts b/hooks/useAuth.ts deleted file mode 100644 index 5419a8c..0000000 --- a/hooks/useAuth.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { AuthenticationContext } from '@/app/context/AuthContext'; -import axios from 'axios'; -import { deleteCookie } from 'cookies-next'; -import { useContext } from 'react'; - -const useAuth = () => { - const { setAuthState } = useContext(AuthenticationContext); - const signIn = async ( - { - email, - password, - }: { - email: string; - password: string; - }, - handleClose: () => void - ) => { - setAuthState({ - data: null, - error: null, - loading: true, - }); - try { - const response = await axios.post( - 'http://localhost:3000/api/auth/signin', - { - email, - password, - } - ); - setAuthState({ - data: response.data, - error: null, - loading: false, - }); - handleClose(); - } catch (error: any) { - setAuthState({ - data: null, - error: error.response.data.errorMessage, - loading: false, - }); - } - }; - const signUp = async ( - { - email, - password, - firstName, - lastName, - city, - phone, - }: { - email: string; - password: string; - firstName: string; - lastName: string; - city: string; - phone: string; - }, - handleClose: () => void - ) => { - setAuthState({ - data: null, - error: null, - loading: true, - }); - try { - const response = await axios.post( - 'http://localhost:3000/api/auth/signup', - { - email, - password, - firstName, - lastName, - city, - phone, - } - ); - setAuthState({ - data: response.data, - error: null, - loading: false, - }); - handleClose(); - } catch (error: any) { - setAuthState({ - data: null, - error: error.response.data.errorMessage, - loading: false, - }); - } - }; - - const signOut = () => { - deleteCookie('jwt'); - setAuthState({ - data: null, - loading: false, - error: null, - }); - }; - - return { - signIn, - signUp, - signOut, - }; -}; - -export default useAuth; diff --git a/package-lock.json b/package-lock.json index 7008b49..3ec822e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "jose": "^4.14.4", "jsonwebtoken": "^9.0.1", "next": "13.4.2", + "next-auth": "^4.23.1", "postcss": "8.4.23", "prisma": "^5.1.1", "react": "18.2.0", @@ -1001,6 +1002,14 @@ "node": ">= 8" } }, + "node_modules/@panva/hkdf": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@panva/hkdf/-/hkdf-1.1.1.tgz", + "integrity": "sha512-dhPeilub1NuIG0X5Kvhh9lH4iW3ZsHlnzwgwbOlgwQ2wG1IqFzsgHqmKPk3WzsdWAeaxKJxgM0+W433RmN45GA==", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/@pkgr/utils": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.0.tgz", @@ -4144,6 +4153,41 @@ } } }, + "node_modules/next-auth": { + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-4.23.1.tgz", + "integrity": "sha512-mL083z8KgRtlrIV6CDca2H1kduWJuK/3pTS0Fe2og15KOm4v2kkLGdSDfc2g+019aEBrJUT0pPW2Xx42ImN1WA==", + "dependencies": { + "@babel/runtime": "^7.20.13", + "@panva/hkdf": "^1.0.2", + "cookie": "^0.5.0", + "jose": "^4.11.4", + "oauth": "^0.9.15", + "openid-client": "^5.4.0", + "preact": "^10.6.3", + "preact-render-to-string": "^5.1.19", + "uuid": "^8.3.2" + }, + "peerDependencies": { + "next": "^12.2.5 || ^13", + "nodemailer": "^6.6.5", + "react": "^17.0.2 || ^18", + "react-dom": "^17.0.2 || ^18" + }, + "peerDependenciesMeta": { + "nodemailer": { + "optional": true + } + } + }, + "node_modules/next-auth/node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/next/node_modules/postcss": { "version": "8.4.14", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", @@ -4262,6 +4306,11 @@ "set-blocking": "^2.0.0" } }, + "node_modules/oauth": { + "version": "0.9.15", + "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", + "integrity": "sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==" + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -4383,6 +4432,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/oidc-token-hash": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/oidc-token-hash/-/oidc-token-hash-5.0.3.tgz", + "integrity": "sha512-IF4PcGgzAr6XXSff26Sk/+P4KZFJVuHAJZj3wgO3vX2bMdNVp/QXTP3P7CEm9V1IdG8lDLY3HhiqpsE/nOwpPw==", + "engines": { + "node": "^10.13.0 || >=12.0.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4422,6 +4479,28 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/openid-client": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.5.0.tgz", + "integrity": "sha512-Y7Xl8BgsrkzWLHkVDYuroM67hi96xITyEDSkmWaGUiNX6CkcXC3XyQGdv5aWZ6dukVKBFVQCADi9gCavOmU14w==", + "dependencies": { + "jose": "^4.14.4", + "lru-cache": "^6.0.0", + "object-hash": "^2.2.0", + "oidc-token-hash": "^5.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/openid-client/node_modules/object-hash": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", + "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==", + "engines": { + "node": ">= 6" + } + }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -4689,6 +4768,26 @@ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, + "node_modules/preact": { + "version": "10.17.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.17.1.tgz", + "integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/preact-render-to-string": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.2.6.tgz", + "integrity": "sha512-JyhErpYOvBV1hEPwIxc/fHWXPfnEGdRKxc8gFdAZ7XV4tlzyzG847XAyEZqoDnynP88akM4eaHcSOzNcLWFguw==", + "dependencies": { + "pretty-format": "^3.8.0" + }, + "peerDependencies": { + "preact": ">=10" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -4697,6 +4796,11 @@ "node": ">= 0.8.0" } }, + "node_modules/pretty-format": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", + "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==" + }, "node_modules/prisma": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.1.1.tgz", @@ -5668,6 +5772,14 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/validator": { "version": "13.11.0", "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", @@ -6452,6 +6564,11 @@ "fastq": "^1.6.0" } }, + "@panva/hkdf": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@panva/hkdf/-/hkdf-1.1.1.tgz", + "integrity": "sha512-dhPeilub1NuIG0X5Kvhh9lH4iW3ZsHlnzwgwbOlgwQ2wG1IqFzsgHqmKPk3WzsdWAeaxKJxgM0+W433RmN45GA==" + }, "@pkgr/utils": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.0.tgz", @@ -8680,6 +8797,29 @@ } } }, + "next-auth": { + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-4.23.1.tgz", + "integrity": "sha512-mL083z8KgRtlrIV6CDca2H1kduWJuK/3pTS0Fe2og15KOm4v2kkLGdSDfc2g+019aEBrJUT0pPW2Xx42ImN1WA==", + "requires": { + "@babel/runtime": "^7.20.13", + "@panva/hkdf": "^1.0.2", + "cookie": "^0.5.0", + "jose": "^4.11.4", + "oauth": "^0.9.15", + "openid-client": "^5.4.0", + "preact": "^10.6.3", + "preact-render-to-string": "^5.1.19", + "uuid": "^8.3.2" + }, + "dependencies": { + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + } + } + }, "node-addon-api": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", @@ -8742,6 +8882,11 @@ "set-blocking": "^2.0.0" } }, + "oauth": { + "version": "0.9.15", + "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", + "integrity": "sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==" + }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -8821,6 +8966,11 @@ "es-abstract": "^1.20.4" } }, + "oidc-token-hash": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/oidc-token-hash/-/oidc-token-hash-5.0.3.tgz", + "integrity": "sha512-IF4PcGgzAr6XXSff26Sk/+P4KZFJVuHAJZj3wgO3vX2bMdNVp/QXTP3P7CEm9V1IdG8lDLY3HhiqpsE/nOwpPw==" + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -8848,6 +8998,24 @@ "is-wsl": "^2.2.0" } }, + "openid-client": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.5.0.tgz", + "integrity": "sha512-Y7Xl8BgsrkzWLHkVDYuroM67hi96xITyEDSkmWaGUiNX6CkcXC3XyQGdv5aWZ6dukVKBFVQCADi9gCavOmU14w==", + "requires": { + "jose": "^4.14.4", + "lru-cache": "^6.0.0", + "object-hash": "^2.2.0", + "oidc-token-hash": "^5.0.3" + }, + "dependencies": { + "object-hash": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", + "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==" + } + } + }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -9002,11 +9170,29 @@ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, + "preact": { + "version": "10.17.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.17.1.tgz", + "integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA==" + }, + "preact-render-to-string": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.2.6.tgz", + "integrity": "sha512-JyhErpYOvBV1hEPwIxc/fHWXPfnEGdRKxc8gFdAZ7XV4tlzyzG847XAyEZqoDnynP88akM4eaHcSOzNcLWFguw==", + "requires": { + "pretty-format": "^3.8.0" + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" }, + "pretty-format": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", + "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==" + }, "prisma": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.1.1.tgz", @@ -9665,6 +9851,11 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, "validator": { "version": "13.11.0", "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", diff --git a/package.json b/package.json index 77b50b3..276682b 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "jose": "^4.14.4", "jsonwebtoken": "^9.0.1", "next": "13.4.2", + "next-auth": "^4.23.1", "postcss": "8.4.23", "prisma": "^5.1.1", "react": "18.2.0", diff --git a/pages/api/auth/me.ts b/pages/api/auth/me.ts deleted file mode 100644 index e4cea32..0000000 --- a/pages/api/auth/me.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { NextApiRequest, NextApiResponse } from 'next'; - -import jwt from 'jsonwebtoken'; -import { PrismaClient } from '@prisma/client'; - -const prisma = new PrismaClient(); - -export default async function handler( - req: NextApiRequest, - res: NextApiResponse -) { - const bearerToken = req.headers['authorization'] as string; - const token = bearerToken.split(' ')[1]; - - const payload = jwt.decode(token) as { email: string }; - - if (!payload.email) { - return res.status(401).send({ - errorMessage: 'Unauthorized request', - }); - } - - const user = await prisma.user.findUnique({ - where: { - email: payload.email, - }, - select: { - id: true, - name: true, - email: true, - avatar: true, - phone: true, - userID: true, - }, - }); - - if (!user) { - return res.status(401).json({ - errorMessage: 'User not found', - }); - } - - return res.json({ - me: user, - }); -} diff --git a/pages/api/auth/signin.ts b/pages/api/auth/signin.ts deleted file mode 100644 index 0a0c828..0000000 --- a/pages/api/auth/signin.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { PrismaClient } from '@prisma/client'; -import { NextApiRequest, NextApiResponse } from 'next'; -import validator from 'validator'; -import bcrypt from 'bcrypt'; -import * as jose from 'jose'; -import { setCookie } from 'cookies-next'; - -const prisma = new PrismaClient(); - -export default async function handler( - req: NextApiRequest, - res: NextApiResponse -) { - if (req.method === 'POST') { - const { email, password } = req.body; - const errors: string[] = []; - const validationSchema = [ - { - valid: validator.isEmail(email), - errorMessage: 'Invalid email/User does not exists', - }, - { - valid: validator.isLength(password, { - min: 1, - }), - errorMessage: 'Password is invalid', - }, - ]; - validationSchema.forEach((check) => { - if (!check.valid) { - errors.push(check.errorMessage); - } - }); - - if (errors.length > 0) { - return res.status(400).json({ errorMessage: errors[0] }); - } - const user = await prisma.user.findUnique({ - where: { email }, - }); - - if (!user) { - return res - .status(401) - .json({ errorMessage: 'Email or password invalid ' }); - } - const isMatch = await bcrypt.compare(password, user.password); - if (!isMatch) { - return res - .status(401) - .json({ errorMessage: 'Email or password invalid ' }); - } - - const alg = 'HS256'; - const secret = new TextEncoder().encode(process.env.JWT_SECRET); - const token = await new jose.SignJWT({ - email: user.email, - }) - .setProtectedHeader({ alg }) - .setExpirationTime('24h') - .sign(secret); - setCookie('jwt', token, { - req, - res, - maxAge: 60 * 6 * 24, - }); - return res.status(200).json({ - name: user.name, - email: user.email, - phone: user.phone, - avatar: user.avatar, - }); - } - - return res.status(404).json('Undefined Endpoint'); -} diff --git a/pages/api/auth/signup.ts b/pages/api/auth/signup.ts deleted file mode 100644 index e7c30d0..0000000 --- a/pages/api/auth/signup.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { PrismaClient } from '@prisma/client'; -import { NextApiRequest, NextApiResponse } from 'next'; -import validator from 'validator'; -import bcrypt from 'bcrypt'; -import * as jose from 'jose'; -import { setCookie } from 'cookies-next'; - -const prisma = new PrismaClient(); - -export default async function handler( - req: NextApiRequest, - res: NextApiResponse -) { - if (req.method === 'POST') { - const { name, userID, email, password, phone, avatar } = req.body; - const errors: string[] = []; - const validationSchema = [ - { - valid: validator.isLength(name, { - min: 1, - max: 50, - }), - errorMessage: 'Name is too long/invalid', - }, - { - valid: validator.isLength(userID, { - min: 1, - max: 50, - }), - errorMessage: 'Name is too long/invalid', - }, - { - valid: validator.isEmail(email), - errorMessage: 'Incorrect email', - }, - { - valid: validator.isMobilePhone(phone), - errorMessage: 'Phone number is invalid', - }, - { - valid: validator.isStrongPassword(password), - errorMessage: 'Password is not strong', - }, - ]; - validationSchema.forEach((check) => { - if (!check.valid) { - errors.push(check.errorMessage); - } - }); - if (errors.length > 0) { - return res.status(400).json({ - errorMessage: errors[0], - }); - } - - const userWithEmail = await prisma.user.findUnique({ - where: { email }, - }); - if (userWithEmail) { - return res.status(400).json({ - errorMessage: 'Email already exists', - }); - } - - const userWithUserID = await prisma.user.findUnique({ - where: { userID }, - }); - if (userWithEmail) { - return res.status(400).json({ - errorMessage: 'UserID taken', - }); - } - - const hashedPassword = await bcrypt.hash(password, 10); - const user = await prisma.user.create({ - data: { - name, - password: hashedPassword, - phone, - email, - userID, - avatar, - }, - }); - const alg = 'HS256'; - const secret = new TextEncoder().encode(process.env.JWT_SECRET); - const token = await new jose.SignJWT({ - email: user.email, - userID: user.userID, - }) - .setProtectedHeader({ alg }) - .setExpirationTime('24h') - .sign(secret); - setCookie('jwt', token, { - req, - res, - maxAge: 60 * 6 * 24, - }); - return res.status(200).json({ - name: user.name, - email: user.email, - phone: user.phone, - userID: user.userID, - avatar: user.avatar, - }); - } -} diff --git a/public/gamedoora.png b/public/gamedoora.png new file mode 100644 index 0000000..5597e5a Binary files /dev/null and b/public/gamedoora.png differ diff --git a/public/next.svg b/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/vercel.svg b/public/vercel.svg deleted file mode 100644 index d2f8422..0000000 --- a/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/app/(auth)/components/Brand.tsx b/src/app/(auth)/components/Brand.tsx new file mode 100644 index 0000000..fbc2ebc --- /dev/null +++ b/src/app/(auth)/components/Brand.tsx @@ -0,0 +1,17 @@ +import Image from 'next/image'; + +export default function Brand({ signIn }: { signIn: boolean }) { + return ( +
+ {signIn + ? 'Sign In to access your account' + : 'Sign Up to create an account'} +
++ A platform for passionate people to connect and collaborate freely. +
++ Don't have an account yet?{' '} + + Sign up + + . +
++ Have an account already?{' '} + + Sign In + + . +
+{f.title}
-{f.author}
-{f.title}
+{f.author}
+Game developer
++ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla + vitae hendrerit ante. Vivamus semper, purus id fermentum + posuere. +
+
+ Email:{' '}
+
+ {session?.user?.email}
+
+
+ Phone: +91 9876543210
+
+ Location: Bharat
+