How to add GitHub and Google OAuth to a Next.js App Router SaaS without NextAuth -- handling the callback, exchanging the code for a user profile, upserting the user in Drizzle ORM, and issuing a JWT so the rest of your auth layer stays unchanged.
How to add email verification to a Next.js SaaS -- a signed JWT link sent via Resend on signup, a verify endpoint that marks the user confirmed in Drizzle ORM, and a service-layer guard that blocks unverified users from protected actions.
How to implement GDPR right to erasure and data portability in a Next.js SaaS -- a self-service account deletion endpoint, cascading Drizzle ORM deletes, a data export download, and a confirmation gate so users cannot accidentally delete their account.
How to add TOTP-based two-factor authentication to a Next.js SaaS with Drizzle ORM -- generating secrets, rendering QR codes, validating codes at login, and issuing backup codes so users never get locked out.
How to add role-based access control to a Next.js SaaS with Drizzle ORM -- a role enum on the user, a requireRole() helper in the service layer, and route guards that fail fast without leaking data.
How to gate features by Stripe subscription plan in a Next.js SaaS -- storing the plan on the user, checking it in the service layer, and enforcing per-plan usage limits so your free tier actually means something.