firebase - Firebase Google 登录不会添加用户
问题描述
我正在使用 Ionic 和 Capacitor 来开发 iOS 和 Android 应用程序。我正在尝试使用 Google 的 Firebase 进行社交登录。我遵循了一个教程,并将 Google 登录添加到我的应用程序中,这确实有效,但是用户(签名后没有出现在 Firebase 控制台的“身份验证”部分。我正在使用codetrix-studio/capacitor-google-auth"
,这就是我签署用户在:
async googleSignIn() {
let googleUser = await Plugins.GoogleAuth.signIn();
let user: User = {
uid: googleUser.id,
displayName: googleUser.name,
email: googleUser.email,
photoURL: googleUser.imageUrl
}
}
我还看到在 Ionic 页面上有一个叫做 Firebase Authentication 的东西(看起来它是使用 Cordova 并且没有可用的 Capacitor 插件)。似乎它与电容器谷歌身份验证的目的相同,但我不太确定。
这是链接:https ://ionicframework.com/docs/v3/native/firebase-authentication/
不知道如何继续,我确实让谷歌登录工作,我让用户回来,但它不会出现在Authentication
标签上。
解决方案
我已经设法使用Capacitor Firebase Auth Plugin完成这项工作。
为了支持 iOS 和 Android 应用程序的 Firebase 身份验证,您需要进行一些配置。此处已对所有内容进行了说明,因此请务必仔细阅读本指南。
我还写了一篇关于Ionic Apps 中的 Firebase 身份验证的教程,并提到了如何解决这个问题以及如何为 Google Sign In with Firebase 配置所有内容。
推荐阅读
- sql - 在 SQL Server 的存储过程中解析 XML 并输出
- azure - Azure ExpressRoute 是否可以连接到不同组织拥有的多个订阅?
- matlab - Matlab代码将转换应用于文件夹中的每个文件
- flutter - 如何获取父级中动画值的子级小部件大小
- javascript - How to make this bezier curve resemble the one in the image
- javascript - How to remove double quotes from JS string?
- r - invalid 'type' (character of argument
- html - How to delete the extra white space of the body height when I move my sections up
- django - Django validation - avoiding multiple full_cleans()
- javascript - Javascript检测用户是否有鼠标