# Changing issuer value in JWT when account is accessed using custom domain

**URL:** <https://community.auth0.com/t/changing-issuer-value-in-jwt-when-account-is-accessed-using-custom-domain/128406>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [February 27, 2024, 7:24am UTC](https://community.auth0.com/t/changing-issuer-value-in-jwt-when-account-is-accessed-using-custom-domain/128406 "2024-02-27T07:24:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![girish.chalumuri.c](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@girish.chalumuri.c](https://community.auth0.com/u/girish.chalumuri.c)\
**Post date:** [February 27, 2024, 7:24am UTC](https://community.auth0.com/t/changing-issuer-value-in-jwt-when-account-is-accessed-using-custom-domain/128406/1 "2024-02-27T07:24:47Z")

</div>

Hello Everyone,  
I am trying to access my application using custom domain in auth0 and when access token is getting generated , iss value is coming out to be my custom domain not the default auth0 domain.  
I tried editing that from auth0 rules but iss still remained the same.

```auto
{
  "iss": "custom-domain.us.auth0.com", ---> this is my custom auth0 domain.
  "sub": " ******",
  "aud": "https:// ****** nrich.com",
  "scope": " *****",
  "gty": " ****",
  "permissions": [
    " ******"
  ]
}

```

but when what I actually want is

```auto
{
  "iss": "default-domain.us.auth0.com", ---> this is my default auth0 domain.
  "sub": " ******",
  "aud": "https:// ****** nrich.com",
  "scope": " *****",
  "gty": " ****",
  "permissions": [
    " ******"
  ]
}

```

i tried doing this using rules by wrting

context.accessToken.iss = “[default-domain.us.auth0.com](http://default-domain.us.auth0.com)”

but this didnt change the iss in access token.

Any help on this topic would be helpful

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 1, 2024, 1:29am UTC](https://community.auth0.com/t/changing-issuer-value-in-jwt-when-account-is-accessed-using-custom-domain/128406/3 "2024-03-01T01:29:45Z")

</div>

Hi @girish.chalumuri.c,

Welcome to the Auth0 Community!

Yes, what you have observed is by design. The `iss` claim signifies the issuer, meaning the entity that generated and signed the token. So, when you access your application via your custom domain, that custom domain is identified as the issuer.

Similarly, if you log in through your canonical domain, then your canonical domain is the issuer.

This is a fixed aspect of how tokens are issued and cannot be modified once an access token has been issued.

If needed, you can still call your canonical domain to login and still issue an access token that way. Just call the login endpoint on your browser like the following:

```auto
https://{yourDomain}/authorize?
    response_type=code&
    client_id={yourClientId}&
    redirect_uri={https://yourApp/callback}&
    scope={scope}&
    audience={apiAudience}&
    state={state}

```

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![girish.chalumuri.c](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@girish.chalumuri.c](https://community.auth0.com/u/girish.chalumuri.c)\
**Post date:** [March 7, 2024, 3:32am UTC](https://community.auth0.com/t/changing-issuer-value-in-jwt-when-account-is-accessed-using-custom-domain/128406/4 "2024-03-07T03:32:05Z")

</div>

But it is not possible to call authroize end point from react code right, My application is a single page application So I cannot configure that

Please suggest a approach for this.

Thanks and regards,  
Girish

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 8, 2024, 6:04pm UTC](https://community.auth0.com/t/changing-issuer-value-in-jwt-when-account-is-accessed-using-custom-domain/128406/5 "2024-03-08T18:04:23Z")

</div>

Hi @girish.chalumuri.c,

In the Auth0 React SDK, you would call `loginWithRedirect()` to initiate the authorize endpoint. (Reference: [Auth0ContextInterface | @auth0/auth0-react](https://auth0.github.io/auth0-react/interfaces/Auth0ContextInterface.html#loginWithRedirect))

Then, if you need to adjust your domain values, you can change them in the `auth_config.js` file. (Reference: [auth0-react-samples/Sample-01/src/auth\_config.json.example at master · auth0-samples/auth0-react-samples · GitHub](https://github.com/auth0-samples/auth0-react-samples/blob/master/Sample-01/src/auth_config.json.example))

---

<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:** [March 22, 2024, 6:04pm UTC](https://community.auth0.com/t/changing-issuer-value-in-jwt-when-account-is-accessed-using-custom-domain/128406/6 "2024-03-22T18:04:46Z")

</div>

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