Skip to content
masterclass Buddy

Kinde · Function

withAuth

withAuth wraps a Next.js proxy to protect routes with Kinde authentication. It supports public paths, custom login behavior, return redirects, and authorization checks.

Last updated

Syntax

withAuth(callback, options?)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Next.js App Router
  • proxy.ts
  • middleware.ts
  • KindeProvider
  • handleAuth
  • publicPaths
  • isAuthorized

Source: Next.js App Router SDK - Kinde docs. Checked 2026-11-03.