From NextAuth.
The cleanest swap.
NextAuth and @synqid/nextjs are deliberately shape-compatible. Same `auth()` server function, same route handler, same hooks. The main difference is that provider config moves from your repo into the Synq Dashboard — one less file to PR.
NextAuth → Synq
| NextAuth / Auth.js | Synq |
|---|---|
| auth.config.ts | Brand Connections in the Synq Dashboard |
| Providers.Google({ clientId, clientSecret }) | Brand → Connections → Google (paste credentials, save) |
| NextAuth() handler | synqHandlers() — both expose GET + POST |
| auth() (server) | auth() — same shape (@synqid/nextjs/server) |
| useSession() (client) | useUser() / useSynq() (@synqid/nextjs) |
| Callbacks (signIn, jwt, session) | Synq webhooks for side-effects; backend for branching |
| Custom Adapter (DB user storage) | Synq stores users; you store domain data in your DB |
| JWT strategy | OIDC JWTs (RS256, JWKS-verifiable, the spec) |
| Database strategy | No equivalent — Synq is the user DB |
Most of your code stays
1. Provision your Brand + App in Synq
Create an Org, one Brand, and a Web App. Paste your existing Google / Apple / etc. credentials into the Brand → Connections panel. Take the new client_id and client_secret.
2. Replace `next-auth` with `@synqid/nextjs`
Update imports. Rename `auth.config.ts` to whatever you like — it now just calls `synqHandlers()`. Delete provider definitions; they live in the Dashboard now.
3. Move callbacks to webhooks + backend
NextAuth callbacks were a kitchen sink: signIn for blocking sign-ups, jwt for token augmentation, session for shape control. Synq splits them — webhooks for side-effects (welcome email, CRM sync), your backend for branching (deny based on a DB lookup, augment with internal data).
4. Delete the Adapter
If you were using a database Adapter to store users (Prisma, Drizzle, etc.) — that storage moves into Synq. Keep your own DB for application data (orders, preferences, posts) keyed by the Synq user sub.
Common questions
The shortest migration in the list.
Same Next.js shape, simpler config surface, no Adapter to maintain. Most teams ship in a single sprint.
