# \[SOLVED\] NextJS Vercel deployment issue. 500 server response for universal login

**URL:** <https://community.auth0.com/t/solved-nextjs-vercel-deployment-issue-500-server-response-for-universal-login/73649>\
**Category:** Get Help\
**Tags:** 500, nextjs, auth0\
**Created:** [November 23, 2021, 5:36pm UTC](https://community.auth0.com/t/solved-nextjs-vercel-deployment-issue-500-server-response-for-universal-login/73649 "2021-11-23T17:36:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Auth0\_user](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/auth0_user/32/33197_2.png) [@Auth0\_user](https://community.auth0.com/u/Auth0_user)\
**Post date:** [November 23, 2021, 5:36pm UTC](https://community.auth0.com/t/solved-nextjs-vercel-deployment-issue-500-server-response-for-universal-login/73649/1 "2021-11-23T17:36:35Z")

</div>

Hi, I have worked off the @auth0/nextjs example on github and linked my github with vercel. As a result vercel have deployed a dummy site for me to preview my web app. When working locally everything works as expected but when attempting to login on the vercel site auth0 returns a 500.  
I have added the above link as allowed URLs to my application auth0. Is there anything else I need to do? I have also marked my application for production. Is there an extra deploy step?

Upon further inspection I can see in the logs coming from vercel that there is this error:  
TypeError: “secret” is required  
When making a get request to all /api/auth/\* endpoints. Do I need to create another .env file? I only have .env.local with all my credentials in there.

Any advise is appreciated.

---

<div class="post-metadata">

**Author:** ![Auth0\_user](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/auth0_user/32/33197_2.png) [@Auth0\_user](https://community.auth0.com/u/Auth0_user)\
**Post date:** [November 23, 2021, 9:24pm UTC](https://community.auth0.com/t/solved-nextjs-vercel-deployment-issue-500-server-response-for-universal-login/73649/2 "2021-11-23T21:24:46Z")

</div>

I’m posting here in case it helps others in future. Whilst digging in github issues I came across this thread [Auth0 login fails with '"secret" is required' when deployed to Netlify · Issue #393 · auth0/nextjs-auth0 · GitHub](https://github.com/auth0/nextjs-auth0/issues/393#issuecomment-899437771).  
Long story short, it’s possible to add all your environment variables manually to vercel, I’m sure this was part of the fix but it didn’t actually work for me until I created a .env.production for vercel to consume. Which is mentioned at the bottom of this README [nextjs-auth0/README.md at main · auth0/nextjs-auth0 · GitHub](https://github.com/auth0/nextjs-auth0/blob/main/examples/README.md).

Good luck!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [November 24, 2021, 11:30am UTC](https://community.auth0.com/t/solved-nextjs-vercel-deployment-issue-500-server-response-for-universal-login/73649/3 "2021-11-24T11:30:30Z")

</div>

Thanks for sharing that with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 7, 2021, 2:25pm UTC](https://community.auth0.com/t/solved-nextjs-vercel-deployment-issue-500-server-response-for-universal-login/73649/4 "2021-12-07T14:25:23Z")

</div>



---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [July 31, 2024, 9:09pm UTC](https://community.auth0.com/t/solved-nextjs-vercel-deployment-issue-500-server-response-for-universal-login/73649/5 "2024-07-31T21:09:25Z")

</div>

Hey team!

This topic seems related to the new [Auth0 Integration](https://auth0.com/blog/auth0-vercel-integration/) available new in [Vercel Marketplace](https://vercel.com/integrations/auth0). This is the first version of this integration, and we welcome your feedback to improve future iterations.

You’ll need an [existing Vercel project](https://vercel.com/docs/projects/overview) to use the new integration to build and customize the Identity flow. You can either import your project into Vercel or use a Vercel template so you don’t have to start from scratch like our SaaStart template to deploy a production-ready B2B SaaS app in minutes (learn more [here](https://auth0.com/blog/speed-up-your-customer-identity-journey-with-auth0-saastart/)).

If you find yourself having questions regarding this new integration for the next two weeks, we are hosting an [Ask Me Anything session](https://community.auth0.com/t/auth0-community-ask-me-anything-integrating-auth0-within-the-vercel-marketplace/136388). Our Product Expert will provide comprehensive written answers on August 8th from 8 AM to 10 AM PST.

Find out more about [Auth0 Integration](https://auth0.com/blog/auth0-vercel-integration/) and [learn more about AMA](https://community.auth0.com/t/auth0-community-ask-me-anything-integrating-auth0-within-the-vercel-marketplace/136388).

Thanks!  
Dawid
