# Auth0 integration on an existing project on vercel

**URL:** <https://community.auth0.com/t/auth0-integration-on-an-existing-project-on-vercel/184783>\
**Category:** Get Help\
**Tags:** other, test\
**Created:** [March 31, 2025, 9:50am UTC](https://community.auth0.com/t/auth0-integration-on-an-existing-project-on-vercel/184783 "2025-03-31T09:50:48Z")\
**Posts on this page:** 6\
**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, 9:50am UTC](https://community.auth0.com/t/auth0-integration-on-an-existing-project-on-vercel/184783/1 "2025-03-31T09:50:48Z")

</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

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

I WANT HELP IN INTEGRATING IT

---

<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:41pm UTC](https://community.auth0.com/t/auth0-integration-on-an-existing-project-on-vercel/184783/3 "2025-03-31T17:41:32Z")

</div>

Hi @devops17

Welcome to the Auth0 Community!

Regarding the first issue that you have posted, it appears that you application does not have configured the baseURL which would be either the `AUTH0_ISSUER_BASE_URL` or `AUTH0_BASE_URL`.

For your second issue, you might not be redirecting the user properly inside your application.

I would highly recommend to review the following posts regarding the matter:

- [How to Deploy a Next.js App Secured By Auth0 to Vercel](https://developer.auth0.com/resources/guides/web-app/nextjs/vercel-deployment)
- [Auth0 Examples & Templates | Vercel](https://vercel.com/templates/auth0)
- [Auth0 w/ NextJS and Vercel Not Working](https://community.auth0.com/t/auth0-w-nextjs-and-vercel-not-working/111123)
- [How to Deploy a Next.js App Secured By Auth0 to Vercel - #7 by byron.motoche](https://community.auth0.com/t/how-to-deploy-a-next-js-app-secured-by-auth0-to-vercel/106412/7)
- [Nextjs + auth0 work at localhost, but return 404 while depoly to vercel - #6 by onlinepenguin](https://community.auth0.com/t/nextjs-auth0-work-at-localhost-but-return-404-while-depoly-to-vercel/112999/6)
- [Vercel Integration with Auth0](https://auth0.com/docs/customize/integrations/integrate-with-vercel)

Let me know if you have any other questions regrding the matter!

Kind Regards,  
Nik

---

<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:** [April 1, 2025, 6:57am UTC](https://community.auth0.com/t/auth0-integration-on-an-existing-project-on-vercel/184783/4 "2025-04-01T06:57:02Z")

</div>

Hello ,  
The links are not that useful for me at this stage  
the issue what i am facing is , we have integrated auth0 - sign in and sign up is working very prefectly even in the Auth0- Monitioring and logs i am getting success message .  
The issue what i am facing is after sign in it doesnt redirect to my dashboard and gives a 400 error. I want help with that .

---

<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:** [April 1, 2025, 7:32am UTC](https://community.auth0.com/t/auth0-integration-on-an-existing-project-on-vercel/184783/5 "2025-04-01T07:32:42Z")

</div>

it appears that you application does not have configured the baseURL which would be either the `AUTH0_ISSUER_BASE_URL` or `AUTH0_BASE_URL` .

and also for this as Auth0 was installed in Vercel - These links for `AUTH0_ISSUER_BASE_URL` or `AUTH0_BASE_URL` . were there in environment varliables of the project .  
AUTH0\_ISSUER\_BASE\_URL - we are using the default one - [https://dev-mm](https://dev-mm)

---

<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:** [April 1, 2025, 6:41pm UTC](https://community.auth0.com/t/auth0-integration-on-an-existing-project-on-vercel/184783/6 "2025-04-01T18:41:01Z")

</div>

Hi again

Could you please provide me through a DM the tenant name on which you have integrated the application with Vercel so I could take a look?

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 15, 2025, 6:42pm UTC](https://community.auth0.com/t/auth0-integration-on-an-existing-project-on-vercel/184783/7 "2025-04-15T18:42:01Z")

</div>

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