Auth0 Home Blog Docs

Auth.js v8 parseHash not working with Vue.js



I recently upgraded to v8 of auth.js, and it seems like the parseHash method is not working properly.
I have already changed the JsonWebToken Signature algorithm to RS256 so that should not be the problem.

TypeError: e is not a function
    at i.parseHash (index.js:139)
    at Object.readTokensFromAddressBar (eval at <anonymous> (app.js:863), <anonymous>:52:26)
    at eval (eval at <anonymous> (app.js:1223), <anonymous>:50:93)
    at iterator (eval at <anonymous> (app.js:1210), <anonymous>:1631:5)
    at step (eval at <anonymous> (app.js:1210), <anonymous>:1539:9)
    at runQueue (eval at <anonymous> (app.js:1210), <anonymous>:1547:3)
    at HTML5History.confirmTransition (eval at <anonymous> (app.js:1210), <anonymous>:1647:3)
    at HTML5History.transitionTo (eval at <anonymous> (app.js:1210), <anonymous>:1579:8)
    at VueRouter.init (eval at <anonymous> (app.js:1210), <anonymous>:2171:13)
    at Vue$3.beforeCreate (eval at <anonymous> (app.js:1210), <anonymous>:446:22)

Chrome refers to this block as the source of the error:

if (parsedQs.id_token) {
      function (error, payload) {
        if (error) {
          return cb(error);

        return cb(null, buildParseHashResponse(parsedQs, (transaction && transaction.appStatus) || null, payload));
  } else {
    cb(null, buildParseHashResponse(parsedQs, (transaction && transaction.appStatus) || null, null)); // error is actually happening here


The Auth0.js v8 parseHash function needs to be passed a callback argument that represent the function that will process the result.

If you’re incorrectly calling the parseHash method with the incorrect arguments that error in question may be triggered. You did not include the method call in your question so it’s not possible to say for sure this is the root cause.

For example:

// will trigger the error

// will work
vm.webAuth.parseHash(window.location.hash, function (e, r) { console.log({ e: e, r: r }); });