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.
- 04 May, 2024 - Add Database Adapter on the Custom Page
- Protected Page
- NextJs Middleware
- Database Adapter (PostgreSQL and Hasura)
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=