Auth0 issues with Vercel Deployment
Unanswered
Oak apple gall wasp posted this in #help-forum
Oak apple gall waspOP
Hi there! I'm trying to get Auth0 integration working with NextJS on Vercel.
I've configured my existing NextJS file per documentation in the quickstart guide, and have set environment variables in Vercel project, as in the screenshot. We are using the Auth0 Integration available on the Vercel marketplace, and it appears to be properly configured.
We are receiving a 500 response from auth/login and MIDDLEWARE_INVOCATION_FAILED.
What am I missing here? Hopefully this is a sufficient overview of the basic issue but I can certainly provide any relevant code or config.
Thank you! ❤️
I've configured my existing NextJS file per documentation in the quickstart guide, and have set environment variables in Vercel project, as in the screenshot. We are using the Auth0 Integration available on the Vercel marketplace, and it appears to be properly configured.
We are receiving a 500 response from auth/login and MIDDLEWARE_INVOCATION_FAILED.
What am I missing here? Hopefully this is a sufficient overview of the basic issue but I can certainly provide any relevant code or config.
Thank you! ❤️
8 Replies
check the logs in vercel
@Yi Lon Ma check the logs in vercel
Oak apple gall waspOP
The logs show the middleware responding with a 401 unauthorized but no further information as far as I can see.
@Oak apple gall wasp Click to see attachment
go to logs tab
@Yi Lon Ma go to logs tab
Oak apple gall waspOP
Oak apple gall waspOP
Unfortunately no help there
Oak apple gall waspOP
I logged all of my environment variables and noticed that the variables weren't being passed so I investigated and saw Vercel has scoped environment variables and wasn't passing them down into my preview environment.
However, the issue still persists even with that resolved but I believe it is because of incorrectly referenced variables, I'm going to walk through the entire configuration and ensure everything is up to date. The issue is it looks like they changed some of the variable names between last year and this year and evidently some of the information I was looking at when I was configuring was out of date from the current.
I'll update on how my next attempt goes
However, the issue still persists even with that resolved but I believe it is because of incorrectly referenced variables, I'm going to walk through the entire configuration and ensure everything is up to date. The issue is it looks like they changed some of the variable names between last year and this year and evidently some of the information I was looking at when I was configuring was out of date from the current.
I'll update on how my next attempt goes
Oak apple gall waspOP
I've got it working! I had to make adjustments to the paths, using middleware the paths are just /auth/login etc as well as the above. Additionally, the new documentation is using slightly different ENV variables than the ones that the Auth0 integration implements on Vercel by default.
This message is just for people who search this later for a solution, as I know full well how furstrating it is when someone just says "nvm figured it out" and leaves no breadcrumbs for future explorers. I've hopefully left you something usable - you've got this!
This message is just for people who search this later for a solution, as I know full well how furstrating it is when someone just says "nvm figured it out" and leaves no breadcrumbs for future explorers. I've hopefully left you something usable - you've got this!