Uncaught (in promise) TypeError: Cannot read property 'digest' of undefined
at T (auth0-spa-js.production.js:404)
at oe.<anonymous> (auth0-spa-js.production.js:722)
at Generator.next (<anonymous>)
at auth0-spa-js.production.js:46
at new Promise (<anonymous>)
at t (auth0-spa-js.production.js:23)
at oe.loginWithRedirect (auth0-spa-js.production.js:715)
at loginWithRedirect (react-auth0-wrapper.js:77)
at onClick (Navbar.jsx:13)
at HTMLUnknownElement.callCallback (react-dom.development.js:147)
at Object.invokeGuardedCallbackDev (react-dom.development.js:196)
at invokeGuardedCallback (react-dom.development.js:250)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:265)
at executeDispatch (react-dom.development.js:571)
at executeDispatchesInOrder (react-dom.development.js:596)
at executeDispatchesAndRelease (react-dom.development.js:695)
at executeDispatchesAndReleaseTopLevel (react-dom.development.js:704)
at forEachAccumulated (react-dom.development.js:676)
at runEventsInBatch (react-dom.development.js:844)
at runExtractedEventsInBatch (react-dom.development.js:852)
at handleTopLevel (react-dom.development.js:5029)
at batchedUpdates$1 (react-dom.development.js:21463)
at batchedUpdates (react-dom.development.js:2247)
at dispatchEvent (react-dom.development.js:5109)
at react-dom.development.js:21520
at Object.unstable_runWithPriority (scheduler.development.js:255)
at interactiveUpdates$1 (react-dom.development.js:21519)
at interactiveUpdates (react-dom.development.js:2268)
at dispatchInteractiveEvent (react-dom.development.js:5085)
I’ll verify I’ve done all the steps, with extra info -
Domain/Client ID - So I tried with the default app and a new app I created. They had the same domain but different IDs. I think this is ok, the domain says it’s andy3’s stuff.
Allowed call back - I’m using ‘http://pinkwing:3001/callback’. I’ve got a modified /etc/hosts and pinkwing points to a machine on my local network. So it can’t be accessed from internet, but I think that’s ok. Browser on laptop can get to it and run the react code fine.
create app ok: npx create-react-app my-app
install packages ok: npm install react-router-dom @auth0/auth0-spa-js
file react-auth0-wrapper.js in src ok
components Navbar.jsx ok
file src/index.js ok
auth_config.json ok (tried with both clientIds, one for each of my Apps)
App.js ok
And this is checkpoint. When I load the page I see the ‘Log in’ button.
But pressing it fails with above error.
Unhandled Rejection (TypeError): Cannot read property ‘digest’ of undefined
Within the dashboard, there is the universal login. Given it’s name, is this used for all log ins? All apps for a domain? When I go to mine, i.e. in the browser I go to ‘https://MYDOMAIN.eu.auth0.com/login’, I get -
‘’ Oops!, something went wrong
There could be a misconfiguration in the system or a service outage. We track these errors automatically, but if the problem persists feel free to contact us.
Please try again. ‘’
Rather than the first tutorial, I followed this one instead …
This worked but with node backend. For my needs I wanted to use django rest backend. This took a bit more time.
There were a few issues which were pretty hard to diagnose, some which threw me
Django REST JWT config ‘Domain’ which is called ‘JWT_ISSUER’ needs to have the ‘https://’ and ‘/’ rather than just the domain.
React axios.post(url,{},{headers:{Authorization: Bearer xxxxxx}}) I missed out the 2nd parameter {}. I guess this put the auth header into the body of the call.
Just to be sure: do you have maybe any Chrome addons installed that might interfere? Try to disable them or use an incognito window and see if the issue remains.
Hi Mathias, thanks for your reply. I’ve just disabled all browserextensions, without any result.
I’ve tried on both my laptop and my PC, and I’ve let my colleagues try using chrome.
To be sure, I’ve added react-app-polyfill/stable and tightened my browserslist in package.json.
As my application is still in early stages of development, I did not yet add SSL. After adding SSL to my application (and of course whitelisting the https-callback url), it started working. So it seems using a plain http connection doesn’t work properly.