Nts Add Auth

Add Better Auth to an existing project scaffolded with nextjs-trpc-prisma-starter that initially skipped auth. Use this when the user says 'add auth', 'add login', 'wire Better Auth', 'add user accounts', invokes /nts-add-auth, or starts asking permission/session questions in a project without auth wired. Wires up the Better Auth Prisma adapter, session helper, requirePermission helper, /login page (credentials), the auth route handler at /api/auth/[...all], and the User / Session / Account / Verification Prisma models. Updates the tRPC context to include the session and switches the example router from publicProcedure to protectedProcedure.

juncoding 8ac9c87 9.4 KB Updated

File contents

juncoding/nextjs-trpc-prisma-starter/tree/main/skills/nts-add-auth commit 8ac9c87f37

Frequently asked questions

npx skillmds@latest add juncoding/nts-add-auth