Simple Auth for your Next.js 15 App
npx nuauth create
All in one configuration file. No database needed.
typescript
Config
/src/lib/auth.ts
export const auth = NextJWTAuth({
providers: {
google: Google({
client_id: process.env.GOOGLE_ID,
client_secret: process.env.GOOGLE_SECRET,
})
},
apiRoute: '/api/auth',
})
Built-in support for Google, Facebook, and more
Directly call methods via server actions. No need to create API routes.
Create your own custom provider for username and password logins, and directly integrate with your database.
Type-safe session and config objects, even modified, will infer changes accordingly.
Customize the entire auth flow with ease.
CSRF protection, signed cookies, prefixed keys, and more.