[英]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.