Skip to content

Role Based Authentication in Next.js (Google, Github and Credidential Provider)

Notifications You must be signed in to change notification settings

Okeke-Divine/Role-Based-Next-Auth

Repository files navigation

#Role Based Next Auth in Next.Js

Server side, client side and middle ware authentication.

Role: ['Google User','Github User','admin']

admin can create more users

##.env

GITHUB_ID=
GITHUB_SECRET=
GOOGLE_ID=
GOOGLE_SECRET=
ADMIN_EMAIL=<username>@gmail.com
NEXTAUTH_SECRET=
NEXTAUTH_URL=http://localhost:3000
MONGODB_URL=