Hi! @tnolan and welcome back to the Auth0 Community!
The snippet you provided seems correct according to the NextJS documentation, so I believe the problem is somewhere else. As a first thing to try, please disable your Actions in the Auth0 dashboard to ensure they don’t interfere, and try again to authenticate a user on the app running on the hosted environment, where the problem occurs.
You have mentioned that this problem started to happen recently. Could you try again on an older version of NextJS? I’m thinking perhaps the version upgrade is not the issue, but another change you have made recently.
Also, could you please check that when you upgraded the NextJS version, you have followed the steps described in this migration guide for NextJS 4.x.x?
If none of the above solves your issue, please reproduce the error once again so that we can check the logs in hopes of pinpointing the cause.
Thank you for your post, and don’t hesitate to ask more!