Desktop View Required

Please switch to a desktop device for the best experience. This application is optimized for larger screens.

View Demo
Auth

NextAuth.js Integration

NextAuth.js (Auth.js) is the standard for Next.js authentication. Support 50+ OAuth providers, email/password, magic links, and custom credentials. Self-hosted, open-source, and fully customizable.

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

1

Step 1

Install next-auth package

2

Step 2

Create auth configuration in /app/api/auth/[...nextauth]/route.ts

3

Step 3

Add NEXTAUTH_SECRET to environment variables

4

Step 4

Configure OAuth providers with their credentials

5

Step 5

Add SessionProvider to your layout

6

Step 6

Deploy with NextAuth authentication

Environment Variables

NEXTAUTH_SECRET=your_value_here
NEXTAUTH_URL=your_value_here
GOOGLE_CLIENT_ID=your_value_here
GOOGLE_CLIENT_SECRET=your_value_here
GITHUB_ID=your_value_here
GITHUB_SECRET=your_value_here

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

Ready to Use NextAuth.js?

Find templates with NextAuth.js pre-configured. Deploy in under 10 minutes.