Security
Authentication
Authentication
Setup
Authentication is securely handled by NextAuth.js. The configuration is located in app/api/auth/[...nextauth]/route.ts.
Supported Providers
bcrypt for password hashing..env variables:GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRETProtecting Routes
Middleware
We use Next.js Middleware to protect the /cms dashboard routes. Any request to /cms/* without a valid session token is redirected to /login.
// middleware.ts
export { auth as middleware } from "./auth"
export const config = {
matcher: ["/cms/:path*"],
}

