我的问题如下:我在我的应用程序上实施了谷歌服务身份验证,它似乎工作正常。问题是,在此身份验证之后,我将重定向到我的主页组件。 url 已正确更新,但我的应用程序卡在我的登录页面和主页组件之间,请参见下图:
这是我的身份验证代码:
首先,我在调用我的服务的身份验证后使用回调初始化谷歌按钮
google.accounts.id.initialize({
client_id: environment.authConfig.clientId,
callback: (response) => {
if(response.credential){
this.googleSubmitted = true;
this.loading = true;
this.background = false;
this.googleSignIn.handleCredentialResponseGoogle(response);
}
}
});
google.accounts.id.renderButton(
document.getElementById("buttonDiv"),
{ theme: "outline", size: "large" } // customization attributes
);
这是我的重定向
this.router.navigate(['address-list']);
如果有人知道如何解决这个问题,我很高兴收到你的来信:)
祝你有美好的一天! 文森特