[NextJS] LoginHandlerError: Login handler failed. CAUSE: Discovery requests failing for {domain}, expected 200 OK, got: 404 Not Found

I’ll reply in case anyone else finds it. It was indeed a bad environment variable in my .env.local as others have run into. In my case, the .us. piece of my domain was missing somehow.

Once I got the correct value in, I was able to log in.