This is a Next.js project bootstrapped with create-next-app
.
This is the codebase to an article published on LogRocket and assumes you want to try out the sample application from the article.
- MongoDB setup on your machine with a new database called
nextauth
- A new app with a Client ID and Client Secret from Google's Developer Console
- A Gmail account with all the right privileges
- Clone this repository by running:
git clone [email protected]:francisudeji/authentication-for-nextjs-serverless.git
in your terminal of choice. cd
intoauthentication-for-nextjs-serverless
- Install dependencies by running:
npm install
# or
yarn
- Replace the following environment variables with your credentials:
EMAIL_FROM=
EMAIL_USERNAME=
EMAIL_PASSWORD=
GOOGLE_ID=
GOOGLE_SECRET=
- In your terminal, run:
npm run dev
# or
yarn dev
- Open your browser on http://localhost:3000
Happy Coding