# How to redirect to generated staging links (with Vercel)?

**URL:** <https://community.auth0.com/t/how-to-redirect-to-generated-staging-links-with-vercel/85897>\
**Category:** Get Help\
**Tags:** applications, redirect, login\
**Created:** [June 24, 2022, 7:20pm UTC](https://community.auth0.com/t/how-to-redirect-to-generated-staging-links-with-vercel/85897 "2022-06-24T19:20:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CPU](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cpu/32/38362_2.png) [@CPU](https://community.auth0.com/u/CPU)\
**Post date:** [June 24, 2022, 7:20pm UTC](https://community.auth0.com/t/how-to-redirect-to-generated-staging-links-with-vercel/85897/1 "2022-06-24T19:20:38Z")

</div>

I’m building a Nextjs app deployed with [Vercel](https://vercel.com/). Vercel is unique in that it generates preview links for every commit you make so you can see your changes live before they get rolled into production.

The challenge I’m facing is that logins do not work on these preview links because I’m unable to allow list them in my application settings. These unique links have the following URL structure:

```plaintext
"https://${project}-${randomGeneratedString}-${org}.vercel.app/"

// so for example
"https://myproject-n30zkjlc5-myorg.vercel.app/"

```

In my auth0 application settings I tried setting `Allowed Callback URLs/CORS/origins` to the following, but it doesnt seem to work.

```auto
https://mproject-*-myorg.vercel.app

```

Is there any way to get wild card callbacks like this to work? Otherwise it makes testing on staging Vercel links difficult since we can’t login successfully.

---

<div class="post-metadata">

**Author:** ![CPU](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cpu/32/38362_2.png) [@CPU](https://community.auth0.com/u/CPU)\
**Post date:** [June 24, 2022, 8:03pm UTC](https://community.auth0.com/t/how-to-redirect-to-generated-staging-links-with-vercel/85897/2 "2022-06-24T20:03:29Z")

</div>

After some googling I [found the solution](https://github.com/auth0/nextjs-auth0/tree/main/examples#production-deployments-or-other-environments-with-fixed-urls). I was on the right track with the wild card, but I also needed to set my Vercel `AUTH0_ISSUER_BASE_URL` to

```auto
https://${VERCEL_GIT_REPO_SLUG}-${VERCEL_GIT_COMMIT_REF}-${VERCEL_GIT_REPO_OWNER}.vercel.app

```

---

<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:** [July 28, 2022, 12:27pm UTC](https://community.auth0.com/t/how-to-redirect-to-generated-staging-links-with-vercel/85897/3 "2022-07-28T12:27:04Z")

</div>

Glad you have figured it out and thanks for sharing 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:** [July 28, 2022, 12:27pm UTC](https://community.auth0.com/t/how-to-redirect-to-generated-staging-links-with-vercel/85897/4 "2022-07-28T12:27:06Z")

</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:03pm UTC](https://community.auth0.com/t/how-to-redirect-to-generated-staging-links-with-vercel/85897/5 "2024-07-31T21:03:57Z")

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