This is a simple example on how to use custom credentials on next-auth. I coded a custom login and registration form with the shadcn ui
- Start with cloning this repository
git clone https://github.com/maxi-schaefer/NextAuth-Example
- Install the needed dependencies
npm install
- Change your DATABASE_URL and NEXTAUTH_SECRET in .env
DATABASE_URL="POSTGRESQL_LINK"
# Next Auth variables
NEXTAUTH_SECRET = "SOME_RANDOM_STRING"
- Start your development server
npm run dev