# Netlify CI deploy builds and Auth0 Allowed Callback URLs

**URL:** <https://community.auth0.com/t/netlify-ci-deploy-builds-and-auth0-allowed-callback-urls/44546>\
**Category:** Get Help\
**Created:** [June 11, 2020, 8:05pm UTC](https://community.auth0.com/t/netlify-ci-deploy-builds-and-auth0-allowed-callback-urls/44546 "2020-06-11T20:05:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![donavon](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/donavon/32/21550_2.png) [@donavon](https://community.auth0.com/u/donavon)\
**Post date:** [June 11, 2020, 8:05pm UTC](https://community.auth0.com/t/netlify-ci-deploy-builds-and-auth0-allowed-callback-urls/44546/1 "2020-06-11T20:05:00Z")

</div>

My app is hosted/build on Netlify. Every time I make a PR to the source on GitHub, Netlify builds a “deploy build” at the URL “develop-preview-\<PR\_number\>-my-app-name.netlify.app”.

Without needing to go to my Auth0 management console and adding each URL to my “Allowed Callback URLs”, is there a way to have a wildcard in the URL? Something like “\*-my-app-name.netlify.app” maybe?

It’s [the same issue](http://community.auth0.com/t/continous-integration-with-auth0/21657) as this gentleman was having, but his issue went unsolved.

Thanks,  
Donavon

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [June 12, 2020, 11:50am UTC](https://community.auth0.com/t/netlify-ci-deploy-builds-and-auth0-allowed-callback-urls/44546/2 "2020-06-12T11:50:17Z")

</div>

Hello @donavon,

Welcome to the Community.

The only wildcard option that would work is:

```auto
https://*.netlify.app

```

Which is obviously a bad idea. Wildcarding a partial name is not supported.

> **[Subdomain URL Placeholders](https://auth0.com/docs/get-started/applications/wildcards-for-subdomains)**
>
> Describes placeholders, including wildcard and organization placeholders, for subdomains function in application configuration.

---

<div class="post-metadata">

**Author:** ![donavon](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/donavon/32/21550_2.png) [@donavon](https://community.auth0.com/u/donavon)\
**Post date:** [June 12, 2020, 12:44pm UTC](https://community.auth0.com/t/netlify-ci-deploy-builds-and-auth0-allowed-callback-urls/44546/3 "2020-06-12T12:44:42Z")

</div>

So I’m stuck between two companies. I either convince Auth0 to support wildcarding on partial names or convince Netlify to support `develop-preview-<PR_number>.my-app-name.netlify.app` (notice the dot before “my-app-name” instead of the dash).

Without one of these, I can’t use deploy preview branches that work against Auth0 (without manual intervention).

Or… a crazy idea is that on a successful Netlify deploy, I hit the Auth0 API to add the deployed URL as an allowed callback. The list would get rather long though (i.e. hundreds of URLs)! Does this API even exist?

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [June 13, 2020, 1:34pm UTC](https://community.auth0.com/t/netlify-ci-deploy-builds-and-auth0-allowed-callback-urls/44546/4 "2020-06-13T13:34:31Z")

</div>

You can certainly update the configuration [via the API](https://auth0.com/docs/api/management/v2#!/Clients/patch_clients_by_id). We ran into the same problem using heroku preview deploys.

---

<div class="post-metadata">

**Author:** ![donavon](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/donavon/32/21550_2.png) [@donavon](https://community.auth0.com/u/donavon)\
**Post date:** [June 19, 2020, 9:17pm UTC](https://community.auth0.com/t/netlify-ci-deploy-builds-and-auth0-allowed-callback-urls/44546/5 "2020-06-19T21:17:33Z")

</div>

For anyone listening, I’ve found this [Netlify plug-in](https://www.npmjs.com/package/netlify-plugin-auth0-patch-urls). I haven’t implemented it yet, but it looks promising.

More info here:

- [How come "Allowed Web Origins" does not allow wildcards? - #92 by underbluewaters](http://community.auth0.com/t/how-come-allowed-web-origins-does-not-allow-wildcards/9185/92)
- [[Plugin idea] Auth0 custom domain + callback url updater · Issue #655 · netlify/build · GitHub](https://github.com/netlify/build/issues/655)

---

<div class="post-metadata">

**Author:** ![Emuentes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/emuentes/32/26697_2.png) [@Emuentes](https://community.auth0.com/u/Emuentes)\
**Post date:** [August 18, 2021, 12:31am UTC](https://community.auth0.com/t/netlify-ci-deploy-builds-and-auth0-allowed-callback-urls/44546/6 "2021-08-18T00:31:03Z")

</div>

I got this to work!

I created a simple Auth0 managed React app to test how to get Netlify deploy preview functionality working.

We just needed to add the netlify preview URL to these fields in Auth0

- `Allowed Callback URLs` ,
- `Allowed Logout URLs` , and
- `Allowed Web Origins`

Make `sure` there’s a comma between each URL in the list

Netlify preview URL example:  
“https://deploy-preview-\*–your-subdomain-12345.netlify.app/”
