auth0-samples / auth0-react-sample

130 stars 152 forks source link

TypeError: __WEBPACK_IMPORTED_MODULE_3_auth0_js__.webAuth is not a constructor #53

Open amitvchaudhary opened 7 years ago

amitvchaudhary commented 7 years ago

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.

shime commented 7 years ago

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'
});