weehongkoh / nextjs-app-router-nextauth

NextJs 14 Boilerplate with NextAuth Library

Home Page:https://nextjs-app-router-nextauth.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NextJs 14 App Router and NextAuth Boilerplate

NextJs 14 App Router and NextAuth

Demo Link

This is a NextJs 14 App Router boilerplate that uses the NextAuth library.

The current repository includes a database adapter, which increases the complexity of the code.

If you just want to implement the OAuth provider only, this OAuth branch is for you.

Latest Implementation

  • 04 May, 2024 - Add Database Adapter on the Custom Page

Pages

  • Protected Page
  • NextJs Middleware
  • Database Adapter (PostgreSQL and Hasura)

How to Use?

Clone this repository.

Copy the .env.example and rename it as .env . Insert the value to respective field

Run the following command to generate NEXTAUTH_SECRET, openssl rand -base64 32.

NEXTAUTH_URL=
NEXTAUTH_SECRET=

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=

HASURA_PROJECT_ENDPOINT=
HASURA_ADMIN_SECRET=

About

NextJs 14 Boilerplate with NextAuth Library

https://nextjs-app-router-nextauth.vercel.app


Languages

Language:TypeScript 97.1%Language:JavaScript 2.6%Language:CSS 0.3%