# Issuer invalid with custom domain

**URL:** <https://community.auth0.com/t/issuer-invalid-with-custom-domain/27917>\
**Category:** Get Help\
**Created:** [July 13, 2019, 10:32pm UTC](https://community.auth0.com/t/issuer-invalid-with-custom-domain/27917 "2019-07-13T22:32:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rev23dev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rev23dev/32/13118_2.png) [@rev23dev](https://community.auth0.com/u/rev23dev)\
**Post date:** [July 13, 2019, 10:32pm UTC](https://community.auth0.com/t/issuer-invalid-with-custom-domain/27917/1 "2019-07-13T22:32:19Z")

</div>

I have used the [ASP.NET](http://ASP.NET) Core tutorial to connect my [ASP.NET](http://ASP.NET) Core app and request an access token for my API.

This works fine, until I try to use my custom domain. When I switch to it, I receive an Unauthorized response with the following header.

www-authenticate: Bearer error=“invalid\_token”, error\_description=“The issuer is invalid”

What do I need to do to make the API recognize the custom domain?

---

<div class="post-metadata">

**Author:** ![mathiasconradt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mathiasconradt/32/12758_2.png) [@mathiasconradt](https://community.auth0.com/u/mathiasconradt)\
**Post date:** [July 14, 2019, 8:18am UTC](https://community.auth0.com/t/issuer-invalid-with-custom-domain/27917/2 "2019-07-14T08:18:06Z")

</div>

Have you also changed to the custom domain in your `appsettings.json` for your backend/API?

```
{
  "Auth0": {
    "Domain": "YOUR_DOMAIN",
    "ApiIdentifier": "YOUR_API_IDENTIFIER"
  }
}

```

See [Auth0 ASP.NET Core Web API SDK Quickstarts: Authorization](https://auth0.com/docs/quickstart/backend/aspnet-core-webapi#configure-the-sample-project)

---

<div class="post-metadata">

**Author:** ![rev23dev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rev23dev/32/13118_2.png) [@rev23dev](https://community.auth0.com/u/rev23dev)\
**Post date:** [July 14, 2019, 11:27pm UTC](https://community.auth0.com/t/issuer-invalid-with-custom-domain/27917/3 "2019-07-14T23:27:52Z")

</div>

Thanks @mathiasconradt. Yes I had done that, which broke other things which made me think you weren’t supposed to do that (in fact, I thought I read that.)

What I did was added a “CustomDomain” option as well, and use that in both, and continue to use the standard domain anywhere else (management API for example) so this seems to be working now.

---

<div class="post-metadata">

**Author:** ![rev23dev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rev23dev/32/13118_2.png) [@rev23dev](https://community.auth0.com/u/rev23dev)\
**Post date:** [July 15, 2019, 11:37pm UTC](https://community.auth0.com/t/issuer-invalid-with-custom-domain/27917/4 "2019-07-15T23:37:56Z")

</div>

Oh wait, now I remember why I can’t do this… the Winforms library does not play nice with custom domains. So I can’t set the API domain to the custom domain.

---

<div class="post-metadata">

**Author:** ![aamalek](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/aamalek/32/14308_2.png) [@aamalek](https://community.auth0.com/u/aamalek)\
**Post date:** [April 15, 2020, 1:50pm UTC](https://community.auth0.com/t/issuer-invalid-with-custom-domain/27917/5 "2020-04-15T13:50:43Z")

</div>

Any update @mathiasconradt on whether Winforms library allows us to set the API domain as the custom domain? The lack of support for custom domains across the product is quite frustrating as it’s a requirement for many browsers now.

---

<div class="post-metadata">

**Author:** ![rev23dev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rev23dev/32/13118_2.png) [@rev23dev](https://community.auth0.com/u/rev23dev)\
**Post date:** [April 15, 2020, 2:30pm UTC](https://community.auth0.com/t/issuer-invalid-with-custom-domain/27917/6 "2020-04-15T14:30:22Z")

</div>

@aamalek – I currently have the winforms client using my custom domain. I don’t remember what was occurring before or why it wasn’t working, but it does work now.
