Concept Flow - NextAuth.js (Auth.js) setup
Import NextAuth and Providers
Create authOptions object
Configure providers (e.g., GitHub)
Export NextAuth with authOptions
NextAuth API route handles requests
User signs in/out, session managed
Protected pages check session
Access granted or denied
This flow shows how NextAuth.js is set up by importing, configuring providers, exporting the handler, and managing user sessions.