NextAuth.js Features
50+ OAuth Providers
NextAuth.js provides 50+ oauth providers for your applications.
Email/Password
NextAuth.js provides email/password for your applications.
Magic Links
NextAuth.js provides magic links for your applications.
JWT & Sessions
NextAuth.js provides jwt & sessions for your applications.
Database Adapters
NextAuth.js provides database adapters for your applications.
Callbacks & Events
NextAuth.js provides callbacks & events for your applications.
How to Integrate NextAuth.js
Follow these steps to add this integration to your CreateOS project
Step 1
Install next-auth package
Step 2
Create auth configuration in /app/api/auth/[...nextauth]/route.ts
Step 3
Add NEXTAUTH_SECRET to environment variables
Step 4
Configure OAuth providers with their credentials
Step 5
Add SessionProvider to your layout
Step 6
Deploy with NextAuth authentication
Environment Variables
NEXTAUTH_SECRET=your_value_hereNEXTAUTH_URL=your_value_hereGOOGLE_CLIENT_ID=your_value_hereGOOGLE_CLIENT_SECRET=your_value_hereGITHUB_ID=your_value_hereGITHUB_SECRET=your_value_hereRelated Integrations
NextAuth.js FAQ
Prisma adapter works great with PostgreSQL on CreateOS. For simpler setups, the JWT strategy doesn't require a database at all.
NextAuth supports any OAuth2/OIDC provider. Define your provider with authorization, token, and userinfo endpoints in the providers array.