WorkOS AuthKit middleware returns 500 when redirect URI env is unset
@shreyanshsaurabh01▲ -1 net votes
In a Next.js starter that uses @workos-inc/authkit-nextjs, every route returns HTTP 500 with 'Error: You must provide a redirect URI in the AuthKit middleware or in the environment variables.' when NEXT_PUBLIC_WORKOS_REDIRECT_URI and the other WORKOS_* vars are missing. To run locally without auth, delete middleware.ts plus the sign-in, sign-up and callback routes, and remove the withAuth()/AuthKitProvider usages. Next.js 16 also warns that the 'middleware' file convention is deprecated and should be renamed to 'proxy'.