简体   繁体   English

如何在 android 和 Z1BDF605991920DB11CBDF850820 的 react-native 应用程序中使用 firebase 成功执行 Google 登录?

[英]How can I successfully perform Google-login using firebase in react-native application for android and iOS both if I am having different client IDs?

I want to perform Google Login using firebase in react-native.我想在 react-native 中使用 firebase 执行 Google 登录。

For android, I have taken web-client ID from google-services.json and for IOS, I have taken web-client ID from GoogleService-Info.plist对于 android,我从 google-services.json 获取了 Web 客户端 ID,对于 IOS,我从 GoogleService-Info.plist 获取了 Web 客户端 ID

Now these both IDs are different, so now I could perform login in either android or iOS at a time.现在这两个 ID 不同,所以现在我可以一次在 android 或 iOS 中执行登录。

what should i do if i want to perform login simultaneously in both android and iOS, though both have different client ID?如果我想在 android 和 iOS 中同时执行登录,我应该怎么做,尽管两者都有不同的客户端 ID?

You should initialize the Firebase SDK with the configuration data for the platform that it is executing on.您应该使用正在执行的平台的配置数据初始化 Firebase SDK。 So this typically means that you include the configuration for each platform in the app, and then select the config for the current platform at runtime.所以这通常意味着您在应用程序中包含每个平台的配置,然后在运行时为当前平台包含 select 配置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 firebase 上为 razorpay 创建 order_id? 我正在使用 react-native 和 firebase 进行移动应用程序 - How to create order_id on firebase for razorpay? I am using react-native with firebase for mobile application 嘿,我正在尝试使用 react-native 和 firebase 作为我的主数据库来构建一个博客应用程序 - hey i am trying to build a blogging application using react-native and firebase as my primary database 如何在不使用弹出窗口的情况下使用 React Native 和 Firebase 登录 Google? - How can I login to Google with React Native and Firebase without using a popup? 我可以使用 firebase 和 react-native 验证电话号码吗? - Can I verify a phone number using firebase and react-native? 适用于两个平台(IOS、Android)的 React Native(+Firebase)上的 Google 登录 - Google Signin on React Native(+Firebase) for both platforms (IOS, Android) 我如何在React Native上更改Firebase IOS项目 - How can i change firebase IOS project on React Native 如何在登录后根据用户的角色(提供者或客户)使用 React Native 和 Firebase/Firestore 渲染 iOS 应用程序的不同屏幕? - How do I render different Screens of an iOS app with React Native and Firebase/Firestore based on a user's role (provider or customer) after login? 我可以使用 React-native、firebase 和节点 js 创建应用程序吗? - Can i create an app with React-native, firebase, and node js? 当应用程序未在 React-Native firebase 中运行时,如何设置通知声音 - How can I set notification sound when app is not running in React-Native firebase React-Native:Firebase实时数据库如何获取一个数据 - React-Native : Firebase Realtime Database How Can I Get One Data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM