Skip to main content
Auth.js (formerly NextAuth) manages cookie-based sessions for human users in Next.js applications; AgentOnboard provides the API token layer for AI agents calling your protected routes.

Copy-paste agent prompt


1. Verifying existing Auth.js users

In your App Router route handler, use requireAgentAccount and query your database adapter with normalizeEmail(email):
app/api/notes/route.ts

2. Enabling agent signup with Auth.js

Add an explicit signup route using createAgentAccount:
app/api/signup/route.ts
emailVerified: new Date()AgentOnboard tokens are backed by a verified email address, so you can mark emailVerified on creation.