2

我正在使用 auth0-jwt 来处理身份验证:

this.auth0.parseHash((err, authResult) => {
  if (authResult && authResult.accessToken && authResult.idToken) {
    window.location.hash = '';
    this.setSession(authResult);
    this.router.navigate(['/']);
  } else if (err) {
    this.router.navigate(['/']);
  }
});

但是,虽然window.location.hash包含 authResult: #access_token=qwe&expires_in=7200&token_type=Bearer&state=zbc&id_token=xyz,但auth0.parseHash返回无效令牌并且authResult未定义我正在使用: "@auth0/angular-jwt": "^1.0.0-beta.9", "auth0-js": "^9.2.2"

4

1 回答 1

0

问题是对应用程序和 Auth0 上定义的域都使用了错误的域

于 2018-11-18T13:54:55.940 回答