# Using machine-to-machine authentication with a custom domain

**URL:** <https://community.auth0.com/t/using-machine-to-machine-authentication-with-a-custom-domain/50461>\
**Category:** Get Help\
**Created:** [September 25, 2020, 4:33pm UTC](https://community.auth0.com/t/using-machine-to-machine-authentication-with-a-custom-domain/50461 "2020-09-25T16:33:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![keithfs](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/keithfs/32/24488_2.png) [@keithfs](https://community.auth0.com/u/keithfs)\
**Post date:** [September 25, 2020, 4:33pm UTC](https://community.auth0.com/t/using-machine-to-machine-authentication-with-a-custom-domain/50461/1 "2020-09-25T16:33:10Z")

</div>

I’ve set up an application using a custom domain and can successfully authenticate users to it, using the custom domain as the authority.

Now I want to add a machine-to-machine application but that is automatically configured with the auth0 domain and I can’t change it to use the custom domain.

So I can’t support both authentication methods at the same time without disabling issuer verification. Is there any way around this?

---

<div class="post-metadata">

**Author:** ![joseantonio.rey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joseantonio.rey/32/14670_2.png) [@joseantonio.rey](https://community.auth0.com/u/joseantonio.rey)\
**Post date:** [September 25, 2020, 4:36pm UTC](https://community.auth0.com/t/using-machine-to-machine-authentication-with-a-custom-domain/50461/2 "2020-09-25T16:36:05Z")

</div>

Hello, @keithfs - welcome to the Auth0 Community!

Machine to machine authentication should work with Custom Domains. What error are you getting when using your Custom Domain for M2M authentication?

---

<div class="post-metadata">

**Author:** ![keithfs](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/keithfs/32/24488_2.png) [@keithfs](https://community.auth0.com/u/keithfs)\
**Post date:** [September 28, 2020, 8:53am UTC](https://community.auth0.com/t/using-machine-to-machine-authentication-with-a-custom-domain/50461/3 "2020-09-28T08:53:38Z")

</div>

Hey, thanks for the welcome and the prompt response 🙂

I was double-checking my config as I was composing my reply and it turns out I had a mismatch - my M2M was using the [xx.eu.auth0.com](http://xx.eu.auth0.com) authority and my web app was using my custom domain [auth.xx.com](http://auth.xx.com), so the two types of tokens had different issuers, which makes sense. Once I changed the M2M app to use the custom domain, all was good 👍

---

<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:** [July 8, 2024, 10:08pm UTC](https://community.auth0.com/t/using-machine-to-machine-authentication-with-a-custom-domain/50461/4 "2024-07-08T22:08:04Z")

</div>

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