简体   繁体   English

Firebase Cordova登录设置

[英]Firebase cordova signin setup

I am following the direction for adding firebase auth to my cordova project but I have an issue with step 3 and 6 of the documentation. 我正在按照向我的cordova项目添加firebase auth的说明进行操作,但是文档的第3步和第6步存在问题。

document -- firebase -cordova setup 文档-firebase -cordova设置

I am currently using Custom URL scheme (no firebase) that looks like mycoolapp:// and it woking ok on both cordova android and ios app. 我目前正在使用看起来像mycoolapp://的自定义URL方案(没有firebase),并且在cordova android和ios应用上都可以正常运行。 This is in the docs for this plugin 这是在此插件的文档中

Now I am trying to add firebase auth to my app and I am need some clarification. 现在,我正在尝试将Firebase身份验证添加到我的应用中,我需要澄清一下。

In step 3 of the documentation it says : 在文档的第3步中说:

To set up an iOS app, create an iOS application and add it to the Firebase console. 要设置iOS应用,请创建一个iOS应用并将其添加到Firebase控制台。 You will need the iOS bundle ID to add later when installing the custom URL scheme plugin 在安装自定义URL方案插件时,您将需要iOS软件包ID才能在以后添加

then in step 6 然后在步骤6

Plugin to handle deep linking through Custom Scheme for iOS Substitute # com.firebase.cordova with the iOS bundle ID of your app. 插件可用于通过“ iOS的自定义方案”使用您应用的iOS捆绑包ID替换#com.firebase.cordova进行深层链接。

cordova plugin add cordova-plugin-customurlscheme --variable \\ URL_SCHEME=com.firebase.cordova --save cordova插件添加cordova-plugin-customurlscheme --variable \\ URL_SCHEME = com.firebase.cordova --save

Given that I am already using the customurlscheme plugin with the URl SCHEME = mycoolapp:// then can I continue to use it or do I have change all my code to now use the bundle id.. Also, my cordova iOS and Android have different bundle ID 鉴于我已经在使用带有URl SCHEME = mycoolapp://的customurlscheme插件,那么我可以继续使用它还是更改所有代码以现在使用捆绑软件ID。此外,我的cordova iOS和Android也有不同捆绑ID

Thanks 谢谢

I believe you should be able to add multiple custom schemes. 我相信您应该能够添加多个自定义方案。 The Firebase Auth client SDK will detect the incoming link on its own. Firebase Auth客户端SDK将自行检测传入的链接。 You don't need to handle that logic. 您无需处理该逻辑。

Based on https://github.com/EddyVerbruggen/Custom-URL-scheme#manually 基于https://github.com/EddyVerbruggen/Custom-URL-scheme#manually

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>URL_SCHEME</string>
    </array>
  </dict>
</array>

CFBundleURLSchemes takes an array of custom schemes. CFBundleURLSchemes采用一系列自定义方案。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM