Basic Auth with Next.JS
I recently needed to add a temporary section to a website which should only be visible to me. This site didn't have any other auth configured, and it wouldn't need it after this, so I was hesitant to pull in a full auth system.
Instead, I opted for basic.. Basic Auth :) This is that old-school login where the browser prompts for a username/password in a native dialog and persists it for your session.
With Next.js, it was simple enough - just one manual route.ts
file to bounce between.