auth0-react-sample icon indicating copy to clipboard operation
auth0-react-sample copied to clipboard

TypeError: __WEBPACK_IMPORTED_MODULE_3_auth0_js__.webAuth is not a constructor

Open amitvchaudhary opened this issue 8 years ago • 1 comments

Hi All,

I am getting below error: TypeError: WEBPACK_IMPORTED_MODULE_3_auth0_js.webAuth is not a constructor

I am using "auth0-js": "^8.9.1", in my package.json and have followed those auto generated docs and have come across this error.

Please let me know the solution of this.

amitvchaudhary avatar Aug 12 '17 06:08 amitvchaudhary

Looks like you're still using an older version of auth0-js. What happens if you run it like this:

import auth0 from 'auth0-js'

new auth0({
  domain: 'blahblah.auth0.com',
  clientID: 'blah',
  redirectUri: 'http://localhost:3000/callback',
  audience: 'https://blahblah.auth0.com/userinfo',
  responseType: 'token id_token',
  scope: 'openid'
});

shime avatar Aug 15 '17 20:08 shime