Angular parseHash returns undefined

What is the output of err that you’re getting when authResult is undefined?

Can you try:

this.auth0.parseHash((err, authResult) => { 
  if (err) {
    console.log(err);
    this.router.navigate('/']); 
  }

  else if (authResult && authResult.accessToken && authResult.idToken) { 
    window.location.hash = ''; 
    this.setSession(authResult); 
    this.router.navigate('/']); 
  } 
});