-1

无法使用 angular-6-social-login 在 ionic 应用程序中使用 google 登录。它在浏览器上运行良好,但在应用程序的情况下,在提供凭据后它显示白色空白页。我的代码如下

public socialSignIn(socialPlatform: string) {
let socialPlatformProvider;
if (socialPlatform == "facebooks") {
  socialPlatformProvider = FacebookLoginProvider.PROVIDER_ID;
} else if (socialPlatform == "google") {
  socialPlatformProvider = GoogleLoginProvider.PROVIDER_ID;
}

  this.socialAuthService.signIn(socialPlatformProvider).then(
    (userData) => {
      this.socialUserEmail = userData.email;
      this.socialId = userData.id;
      this.socialName = userData.name;
      this.insertsociallogindetails();
    }, (error) => {
      console.log(error);
      alert(error);
    }
  );

}

这是屏幕 在此处输入图像描述

请给我解决方案。

4

1 回答 1

0

更新 我使用了这个包 https://www.npmjs.com/package/capacitor-firebase-auth 也许它有帮助

原始答案 不幸的是,电容器不适用于firebase-ui,也不适用于ngx-firebaseui。您必须自己使用 angularFireAuth 方法登录。如果内存没有失败,则 signInWithProvider

于 2019-11-18T16:39:08.217 回答