This project demonstrates how to integrate Hono.js with NextAuth.js for authentication in a Next.js application. Hono.js serves as the backend, providing lightweight, high-performance API handling, while NextAuth.js manages secure authentication with various providers.
git clone https://github.com/Yash0z/Hono-NextAuth.git
cd Hono-NextAuth
npm install
Create a .env.local file in the Next.js project root and configure environment variables for your authentication providers:
AUTH_URL = ""
AUTH_SECRET = ""
GITHUB_ID = ""
GITHUB_SECRET = ""
AUTH_GOOGLE_ID = ""
AUTH_GOOGLE_SECRET = ""
You can add details for more providers (e.g. Apple, Twitter, Discord, Email, etc).
url : hono-next-auth-levf.vercel.app/