我正在使用angularx-social-login。我可以在 loginComponent 中使用 Google 登录:
this.authService.signIn(GoogleLoginProvider.PROVIDER_ID).then(
data => {
this.socialUser = data;
})
我有这个结构:
app
auth
loginComponent
shared
menuComponent(here is the link logout)
当我尝试从 menuComponent 注销时出现错误:您未登录。
logout(): void {
this.authSocialService.signOut()
.then( res => console.log( res ) )
.catch( err => console.log(err) )
}
我的问题是如何从 loginComponent 中打开的会话的 menuComponent 中注销?
这是在 Stackblitz 中重新创建的错误。