React tutorial app - auth_config.js - could be improved

Hi, just a note to point out that there’s some config in the auth0-spa-js example app which is consumed in such a way as to trip up the unware or the stressed - specifically - if you look at auth_config.js it probably starts off looking like this…

  "domain": "",
  "clientId": "blahblahblah"

so, reading the docs, I needed to add an “audience” value so that getTokenSilently() would return a JWT. When I did this it didn’t work. I still received the “opaque” token.

The problem is here … in index.js…


    <App />

If I don’t include.


that new config item isn’t passed to Auth0.

In my opinion the config should be ingested using one technique only - either the entire config file, or, done in code as above. This tripped me up for several hours.

Good morning,

Thanks for this feedback. I will make these recommendation to our docs team who can further review this or add notes about this.


1 Like

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