# Access Token always returns encrypted ID Token (alg: dir), even with correct audience and settings

**URL:** <https://community.auth0.com/t/access-token-always-returns-encrypted-id-token-alg-dir-even-with-correct-audience-and-settings/186896>\
**Category:** Get Help\
**Tags:** operational-request, free-trial\
**Created:** [May 19, 2025, 11:27am UTC](https://community.auth0.com/t/access-token-always-returns-encrypted-id-token-alg-dir-even-with-correct-audience-and-settings/186896 "2025-05-19T11:27:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![daichitk1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/daichitk1/32/74829_2.png) [@daichitk1](https://community.auth0.com/u/daichitk1)\
**Post date:** [May 19, 2025, 11:27am UTC](https://community.auth0.com/t/access-token-always-returns-encrypted-id-token-alg-dir-even-with-correct-audience-and-settings/186896/1 "2025-05-19T11:27:49Z")

</div>

I am using Auth0 with a React SPA + Rails API setup.  
I want to retrieve an RS256-signed Access Token using `getAccessTokenSilently()` from the SPA.

I have already checked and configured the following:

- OIDC Conformant is enabled for the SPA application in Auth0
- The API uses RS256 and has encryption disabled
- Audience (`https://my_backend_tk.com`) is correctly specified
- Callback URLs and Web Origins are properly set
- I even created **a new API and a new Auth0 Application** from scratch

However, `getAccessTokenSilently()` still returns an encrypted token like this:

```auto
{
  "alg": "dir",
  "enc": "A256GCM"
}

```

This seems like a misconfiguration or bug.  
**Tenant name:** `dev-id5xx82j7py05t5w`

Please help. I’m stuck.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [May 19, 2025, 12:48pm UTC](https://community.auth0.com/t/access-token-always-returns-encrypted-id-token-alg-dir-even-with-correct-audience-and-settings/186896/3 "2025-05-19T12:48:23Z")

</div>

Hi @daichitk1

Welcome to the Auth0 Community!

Thank you for posting your question. Can you double-check if you are properly adding the audience parameter to the request?

```auto
 const accessToken = await getAccessTokenSilently({
          authorizationParams: {
            audience: "API_IDENTIFIER"
          }

```

You can read more about audience here → [Value of the Audience Attribute in Access Token Requests and its Significance](https://community.auth0.com/t/value-of-the-audience-attribute-in-access-token-requests-and-its-significance/71414)

Thanks  
Dawid

---

<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:** [June 2, 2025, 12:49pm UTC](https://community.auth0.com/t/access-token-always-returns-encrypted-id-token-alg-dir-even-with-correct-audience-and-settings/186896/4 "2025-06-02T12:49:16Z")

</div>

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