React SPA deployed on Heroku with Auth0 not working

I have a React SPA app with Auth0 working fine locally, but when I deployed to heroku authentication is not working anymore.

This is the error I got:

This site can’t be reached

undefined ’s server IP address could not be found.

My env vars were set in my heroku config as REACT_APP_AUTH0_CLIENTID and REACT_APP_AUTH0_DOMAIN and then I installed Auth0 add-on and noticed 4 more vars were created. I substituted the values according to my Auth0 settings but still got same error.

This is the tutorial I followed and it worked locally:

Turns out I had to add audience={'https://**deployed url **.com'} to my index.js, otherwise it won’t work (and this is not on the tutorial link above)

I also I had to add this API part (also not in the tutorial)