You Changed a User's Role in the Database, But Their JWT Doesn't Know That Yet
You find out a user's permissions need to change right now, maybe they're being demoted from admin,...
Tag archive
You find out a user's permissions need to change right now, maybe they're being demoted from admin,...
Behind a CDN and an origin reverse proxy, X-Forwarded-Proto arrives as "https, https". An auth middleware builds a URL from it, new URL() throws, and every page returns 500. The obvious fix causes a redirect loop. Measured, with the fix and the two neighbouring headers that break the same way.
Compare Auth.js vs Better Auth for Next.js in 2026 - setup, features, passkeys, organizations, and migration tips to help you pick the right auth library.

You did everything right. Your login endpoint returns a generic "invalid credentials" for both a...
This is a translation of my original article in Japanese: Qiita I run NextAuth (Auth.js) v5 in two...
Learn how to implement role-based authorization (RBAC) in Next.js 16 App Router with TypeScript, Auth.js v5, Proxy, Server Actions, Route Handlers, and permissions.
Hello Dev Community! 👋 It is officially Day 140 of my software engineering marathon! Today, I...
Learn how to add Auth.js (NextAuth v5) authentication to a Next.js 16 App Router project step by step — providers, sessions, protected routes, and proxy.ts, explained for beginners.
Hello Dev Community! 👋 It is officially Day 167 of my full-stack development journey! Today, I...
Compare Clerk vs Auth.js (NextAuth) v5 in 2026 for Next.js 16. Setup time, pricing, middleware security, customization, and which one fits your project.

Ask ten Node teams what they use for auth and you'll get ten different answers. That wasn't always...

Middleware in Next.js runs before every matched request. It's the right place for authentication...