Lean as can be: Kinde’s Next.js 13 SDK is here
By Dave Berner —
We’re excited to announce the release of the Kinde Next.js 13 SDK. An authentication solution for Next.js that fully leverages App Router, and ships zero JS to the browser.
Implementation tutorial (YouTube)
At Kinde we’re big believers in shipping as little as possible to the end user - especially when it comes to JavaScript. We’ve gone all in on it. The Kinde app itself is completely server rendered and our marketing site has been on Astro for 2 years, specifically because of how lean it is.
It’s really exciting to see big names like Next.js now going all in on server rendering. This feels like a massive step forward for the web community at large.
Of course, doubling-down on server rendering has had knock-on effects to client side third-party libraries who are trying to find ways to catch-up and be compatible with it.
Other major auth providers have done some really interesting things and reacted quickly, which was awesome to see. Most have leveraged the use client;
escape hatch. This is a totally legitimate approach - and to be fair this is how the previous version of our SDK works as well.
Whilst it does technically “work”, most solutions require you to wrap your entire application in use client;
with a <Provider />
component which passes down context. You’re effectively opting out of most of the benefits that come with server rendering.
If you’re moving to the latest version of Next.js you’re likely an engineer that really cares about minimizing the amount of JS you send to your users and therefore would want an auth solution that isn’t adding to your bundle size. So over the last few weeks we’ve been working on a full server side solution for Next.js that fully leverages App Router and server components and ships zero JS to the browser.
It’s a really exciting release for us, and I’m looking forward to seeing what our community can build with it.
If you have any feedback you can send it to me directly at dave@kinde.com or raise an issue on the Next.js GitHub repository.