A complete starter kit for implementing robust user authentication in Next.js projects, including Google OAuth and form validation. This kit simplifies the integration of a modern authentication stack with best practices.
Clone the repository:
git clone https://github.com/M-Tijani/Auth_Package
cd Auth_Package
Install the packeges:
npm install or npm i
or
pnpm install or npm i
Set up your environment variables.:
DATABASE_URL="mongodb+srv://name:[email protected]"/databaseName?retryWrites=true&w=majority
GOOGLE_CLIENT_ID=From_Google_Console
GOOGLE_CLIENT_SECRET=From_Google_Console
JWT_SECRET=Make_A_Unique_String
NEXTAUTH_SECRET=Make_A_Unique_String
MAILER_SEND_API_KEY=From_Mailjet
GMAIL_APP_PASSWORD=Create_Your_App_Password
GMAIL_USER=Your_Gmail_Account
BRAND_NAME=Your_Brand_Name // "You can remove it if you want"
PRODUCTION=https://your_domain.com
LOCAL=http://localhost:3000
ENVIRONMENT=LOCAL
Prisma Schema:
npx prisma generate
Install the packeges:
npm run dev
or
pnpm run dev
6.Open http://localhost:3000 to see your application in action.