# Auth.js v8 parseHash not working with Vue.js

**URL:** <https://community.auth0.com/t/auth-js-v8-parsehash-not-working-with-vue-js/6124>\
**Category:** Get Help\
**Tags:** v8, spa, vuejs, error\
**Created:** [April 6, 2017, 2:43am UTC](https://community.auth0.com/t/auth-js-v8-parsehash-not-working-with-vue-js/6124 "2017-04-06T02:43:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vahid.a1996](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vahid.a1996/32/7087_2.png) [@vahid.a1996](https://community.auth0.com/u/vahid.a1996)\
**Post date:** [April 6, 2017, 2:43am UTC](https://community.auth0.com/t/auth-js-v8-parsehash-not-working-with-vue-js/6124/1 "2017-04-06T02:43:44Z")

</div>

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) {
    this.validateToken(
      parsedQs.id_token,
      transactionState,
      transactionNonce,
      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
  }

```

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [April 7, 2017, 5:42pm UTC](https://community.auth0.com/t/auth-js-v8-parsehash-not-working-with-vue-js/6124/2 "2017-04-07T17:42:38Z")

</div>

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
vm.webAuth.parseHash(window.location.hash); 

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

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/auth-js-v8-parsehash-not-working-with-vue-js/6124/3 "2018-03-02T05:53:07Z")

</div>


