ios - 离子谷歌登录按钮不提示弹出登录
问题描述
所以我正在开发一个按钮,用户可以使用他们的谷歌账户登录他们的账户。
该按钮在ionic serve
. 完全能够使用我的 Google 帐户登录我的帐户。然而,在我的 iPhone 上,这个按钮什么也没做。
没有看到其他人有类似问题的文章。也许我忘了在 iPhone 上添加应用权限?
HTML
<button class="google-div" (click)="auth.googleSignIn()">
<img class="google" src="../../assets/images/googleLogInLight.png">
</button>
身份验证服务 .TS
googleSignIn() {
const provider = new firebase.auth.GoogleAuthProvider();
return this.oAuthLogin(provider);
}
private async oAuthLogin(provider) {
const credential = await this.afAuth.signInWithPopup(provider);
return this.updateUserData(credential.user);
}
private updateUserData({ uid, email, displayName, photoURL }) {
const userRef: AngularFirestoreDocument<any> = this.afs.doc(`users/${uid}`);
const data = {
uid,
email,
displayName,
photoURL
};
email_out.setEmail(email);
email_out.setid(uid)
this.router.navigate(['/tabs']);
return userRef.set(data, { merge: true });
}
XCode 中的错误
⚡️ To Native -> App addListener 79051384
⚡️ [error] - ERROR Error: Uncaught (in promise): Error: This operation
is not supported in the environment this application is running on.
"location.protocol" must be http, https or chrome-extension and web
storage must be enabled.
我也使用 FireStore 作为我的身份验证。
我还可以使用我的 Google 帐户登录 iPhone 上的其他应用程序。
解决方案
推荐阅读
- laravel - [laravel][npm] 我不能使用 swiper 错误 Uncaught TypeError: Swiper is not a constructor
- javascript - 在 v-for 中调用方法时无限循环
- r - 使用负 str_detect 过滤多列上的行时,any_vars 和 all_vars 谓词的用法不明确
- javascript - 无法使用 react-images Lightbox 的属性
- android - 未采用 camera2 API 设置
- django - django.shortcuts reverse() 在类 var 结果中调用错误 URLconf 'xxx.urls' 似乎没有任何模式
- amazon-web-services - 将数据从 Google Cloud Platform 迁移到 AWS S3
- microsoft-edge - 如何重命名VS中的浏览器选项?
- visual-studio - 在哪里配置本地 Web api 的侦听端口
- c# - 使用 C# 以编程方式更改远程服务器的 web.config