Auth0 Home Blog Docs

Invalid hash after Angular 6 update


#1

After upgrading to Angular 6, I am not getting an Invalid Hash error: errorDescription :“response_type contains id_token, but the parsed hash does not contain an id_token property”. I changed no code on my angular app and it seems to be an issue with auth0-js or the parshHash function. I updated to the latest versions of auth0-js and the matching js files from the CDN. I’m at a loss on why it is not working. I bounce to the hosted login page, but when I come back to my app, it throws this error. Please help!

This is my auth0 WebAuth. I confirmed the variables are correct.

this.auth0 = new auth0.WebAuth({
clientID: this.ss.config.jwt_clientid,
domain: this.authDomain,
responseType: ‘token id_token’,
redirectUri: this.originUrl,
scope: ‘openid profile’
});


#2

Hey Aaron,

What Auth0 libraries and versions are you using?


#3

Should be latest versions.

using in index.html:

My package.json dependencies:

@angular/animations”: “^6.0.3”,
@angular/common”: “^6.0.3”,
@angular/compiler”: “^6.0.3”,
@angular/core”: “^6.0.3”,
@angular/forms”: “^6.0.3”,
@angular/http”: “^6.0.3”,
@angular/platform-browser”: “^6.0.3”,
@angular/platform-browser-dynamic”: “^6.0.3”,
@angular/router”: “^6.0.3”,
@auth0/angular-jwt”: “^2.0.0”,
@types/auth0-js”: “^8.11.2”,
“auth0-js”: “^9.6.1”,
“core-js”: “^2.5.4”,


#4

9.6.1/auth0.min.js (it cut out my CDN js link)