# React app, Receiving an Opaque Token when I should be receiving a JWT token supposedly

**URL:** <https://community.auth0.com/t/react-app-receiving-an-opaque-token-when-i-should-be-receiving-a-jwt-token-supposedly/127852>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [February 20, 2024, 3:00pm UTC](https://community.auth0.com/t/react-app-receiving-an-opaque-token-when-i-should-be-receiving-a-jwt-token-supposedly/127852 "2024-02-20T15:00:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![authMemberuser](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/authmemberuser/32/48744_2.png) [@authMemberuser](https://community.auth0.com/u/authMemberuser)\
**Post date:** [February 20, 2024, 3:00pm UTC](https://community.auth0.com/t/react-app-receiving-an-opaque-token-when-i-should-be-receiving-a-jwt-token-supposedly/127852/1 "2024-02-20T15:00:42Z")

</div>

Hi,

I’m currently developing a React application using Auth0 for authentication. I have set up the Auth0Provider with the correct audience and I’m using the getAccessTokenSilently method to retrieve the access token.

However, I’m encountering an issue where I’m receiving an opaque token instead of the expected JWT token. This is causing problems when I try to use this token to authenticate with my API.

I am using the `@auth0/auth0-react` package with version `"^2.0.1"`

I have defined the audience and scope in the Provider in index.js as well:

```auto
 <Auth0Provider
        domain={process.env.REACT_APP_AUTH0_DOMAIN}
        clientId={process.env.REACT_APP_AUTH0_CLIENTID}
        authorizationParams={{
          redirect_uri: window.location.origin,
        }}
        audience="http://localhost:5000"
        scope="openid profile email"
      >
        <App />
      </Auth0Provider>

```

The audience I have specified is the audience of a valid API that I have created from my Auth0 dashboard. I am pretty confident the api has been set up correctly as well as the actual application which is OIDC conformant. I don’t know what to do. This is the example token I receive from getAccessTokenSliently:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/8/1/812ce655526bbcb2bbae880b45bb2a9c12bea8d3.png)

Please help! Thanks!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 20, 2024, 3:58pm UTC](https://community.auth0.com/t/react-app-receiving-an-opaque-token-when-i-should-be-receiving-a-jwt-token-supposedly/127852/3 "2024-02-20T15:58:07Z")

</div>

Hey @authMemberuser !

What happens if you move the `audience` param (`scope` as well) to _within_ the `authorizationParams` object?

```auto
<Auth0Provider
        domain={process.env.REACT_APP_AUTH0_DOMAIN}
        clientId={process.env.REACT_APP_AUTH0_CLIENTID}
        authorizationParams={{
          redirect_uri: window.location.origin,
          audience="http://localhost:5000",
          scope="openid profile email"
        }}
      >
        <App />
      </Auth0Provider>

```

---

<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 5, 2024, 3:58pm UTC](https://community.auth0.com/t/react-app-receiving-an-opaque-token-when-i-should-be-receiving-a-jwt-token-supposedly/127852/4 "2024-03-05T15:58:22Z")

</div>

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