# Need Help Integrating Auth0 with Existing Next.js Project on Vercel

**URL:** <https://community.auth0.com/t/need-help-integrating-auth0-with-existing-next-js-project-on-vercel/184787>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [March 31, 2025, 11:00am UTC](https://community.auth0.com/t/need-help-integrating-auth0-with-existing-next-js-project-on-vercel/184787 "2025-03-31T11:00:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![devops17](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/devops17/32/70868_2.png) [@devops17](https://community.auth0.com/u/devops17)\
**Post date:** [March 31, 2025, 11:00am UTC](https://community.auth0.com/t/need-help-integrating-auth0-with-existing-next-js-project-on-vercel/184787/1 "2025-03-31T11:00:17Z")

</div>

I’m working on integrating Auth0 authentication into an existing Next.js project hosted on Vercel. Despite following the Auth0 Next.js SDK documentation, I’m encountering several issues during implementation.  
Specific Challenges:

1. Configuration Issues  
Getting 500 errors during authentication flow

Error: Missing required configuration: baseURL

1. Redirect Problems  
Successful login doesn’t redirect properly to `/dashboard`  
Callback URLs seem mismatched despite correct settings

2. Vercel-Specific Concerns  
How to properly set environment variables in Vercel  
Differences between local development and production configuration

What I’ve Tried:

- Followed Auth0’s Next.js quickstart guide
- Configured callback/logout URLs in Auth0 dashboard
- Set up middleware and route handlers
- Verified environment variables locally and in Vercel

ALSO I HAVE SET IT ON LOCAL  
HERE I AM ABLE TO SIGN IN AND SIGN UP - But it doesnt redirect to required site gives error400 and error500 erros

I want help in sorting this out .  
Even a Google meet will work !!

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [March 31, 2025, 5:42pm UTC](https://community.auth0.com/t/need-help-integrating-auth0-with-existing-next-js-project-on-vercel/184787/3 "2025-03-31T17:42:13Z")

</div>

Hi @devops17

I have replied to you on your initial post [here](https://community.auth0.com/t/auth0-integration-on-an-existing-project-on-vercel/184783).

Let’s continue the discussion there if necessary regarding the issue at hand!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 14, 2025, 5:42pm UTC](https://community.auth0.com/t/need-help-integrating-auth0-with-existing-next-js-project-on-vercel/184787/4 "2025-04-14T17:42:17Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
