Skip to content

Yash0z/Hono-NextAuth

Repository files navigation

Hono.js with NextAuth.js Integration

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.

Getting Started

1. Project Setup

git clone https://github.com/Yash0z/Hono-NextAuth.git
cd Hono-NextAuth
npm install

2. Env configuration

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).

Live Example

url : hono-next-auth-levf.vercel.app/

Thank You :>