# Custom domain with default login page has end point error

**URL:** <https://community.auth0.com/t/custom-domain-with-default-login-page-has-end-point-error/13477>\
**Category:** Get Help\
**Tags:** auth0, custom-domain\
**Created:** [July 20, 2018, 3:03pm UTC](https://community.auth0.com/t/custom-domain-with-default-login-page-has-end-point-error/13477 "2018-07-20T15:03:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eugene.low](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/eugene.low/32/8466_2.png) [@eugene.low](https://community.auth0.com/u/eugene.low)\
**Post date:** [July 20, 2018, 3:03pm UTC](https://community.auth0.com/t/custom-domain-with-default-login-page-has-end-point-error/13477/1 "2018-07-20T15:03:28Z")

</div>

I am currently using the default auth0 login and attempting to use it on my custom domain.

The tenant name and domain name are different.

Everything works fine using the auth0 login domain below:

```
new auth0.WebAuth({
      domain: '<tenant>.auth0.com',
      clientID: 'azh9EQ7ccON0T6lcbI5Qk2cMfeoDrIn1',
      redirectUri: 'http://localhost:4000',
      audience: 'https://api-dev.<domain>.com',
      responseType: 'token id_token',
      scope: 'openid profile email',
    })

```

Below is my custom domain settings:

```
new auth0.WebAuth({
      domain: 'login.<domain>.com',
      clientID: 'azh9EQ7ccON0T6lcbI5Qk2cMfeoDrIn1',
      redirectUri: 'http://localhost:4000',
      audience: 'https://api-dev.<domain>.com',
      responseType: 'token id_token',
      scope: 'openid profile email',
    })

```

I get the following error:

`"You should not be hitting this endpoint. Make sure to use the code snippets shown in the tutorial or contact support@auth0.com for help"`

Any help would be appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![patrickcorrigan7](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/patrickcorrigan7/32/8070_2.png) [@patrickcorrigan7](https://community.auth0.com/u/patrickcorrigan7)\
**Post date:** [July 27, 2018, 3:47pm UTC](https://community.auth0.com/t/custom-domain-with-default-login-page-has-end-point-error/13477/3 "2018-07-27T15:47:02Z")

</div>

I’m getting the same error. Any luck with fixing it?

---

<div class="post-metadata">

**Author:** ![eugene.low](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/eugene.low/32/8466_2.png) [@eugene.low](https://community.auth0.com/u/eugene.low)\
**Post date:** [August 17, 2018, 6:52pm UTC](https://community.auth0.com/t/custom-domain-with-default-login-page-has-end-point-error/13477/4 "2018-08-17T18:52:27Z")

</div>

Yes, you need to pass in override options:

```auto
new auth0.WebAuth({
      domain: 'login.<domain>.com',
      clientID: 'azh9EQ7ccON0T6lcbI5Qk2cMfeoDrIn1',
      redirectUri: 'http://localhost:4000',
      audience: 'https://api-dev.<domain>.com',
      responseType: 'token id_token',
      scope: 'openid profile email',
      overrides: {
        __tenant: '<tenant-name>',
        __token_issuer: 'login.<domain>.com'
      },
    })

```

---

<div class="post-metadata">

**Author:** ![thameera](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/thameera/32/13430_2.png) [@thameera](https://community.auth0.com/u/thameera)\
**Post date:** [August 17, 2018, 7:10pm UTC](https://community.auth0.com/t/custom-domain-with-default-login-page-has-end-point-error/13477/5 "2018-08-17T19:10:52Z")

</div>

This is documented here: [Configure Features to Use Custom Domains](https://auth0.com/docs/custom-domains/additional-configuration#universal-login)

---

<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:** [December 14, 2018, 3:30pm UTC](https://community.auth0.com/t/custom-domain-with-default-login-page-has-end-point-error/13477/6 "2018-12-14T15:30:06Z")

</div>


