集成 Firebase 服务会与 Google 登录冲突吗?

Will integrating Firebase services conflict with Google Sign In?

我的应用使用 google 登录。我使用 google 控制台手动生成了 google-services.jsonNOT 来自 android studio / firebase 等)。

目前,虽然我没有明确使用任何 firebase 服务,但我在应用初始化期间看到了与 firebase 相关的消息。

我想集成 ONLY Firebase 实时数据库,我想知道它是否会与我当前基于 Google 单独登录的身份验证方案冲突。重构所有与 auth 相关的逻辑不是我们目前能够承受的,我记得在 google libraries version / gradle / app plugin 上有很多痛苦,因为我们的项目集成了 30 多个库项目。

理想情况下,我应该能够使用我已有的 google 凭据访问 Firebase 数据库,并尽可能避免使用 "frebase-auth" 库复制身份验证逻辑。

这些是我唯一的 google 服务 - 项目的相关依赖项:

dependencies {
    compile 'com.google.android.gms:play-services-auth:10.2.1'
}
apply plugin: 'com.google.gms.google-services'

这是我用于 Google 登录的最小 google-services.json。

{
  "project_info": {
    "project_number": "xxxx",
    "project_id": "yyyy"
  },
  "client": [
    {
      "client_info": {
        "mobilesdk_app_id": "1:xxxx:android:yyy",
        "android_client_info": {
          "package_name": "tv.xxx.mini"
        }
      },
      "oauth_client": [
        {
          "client_id": "xxx.apps.googleusercontent.com",
          "client_type": 1,
          "android_info": {
            "package_name": "xxx.mini",
            "certificate_hash": "xxx"
          }
        },
        {
          "client_id": "xxx.apps.googleusercontent.com",
          "client_type": 3
        }
      ],
      "api_key": [
        {
          "current_key": "xxxxx"
        }
      ],
      "services": {
        "analytics_service": {
          "status": 1
        },
        "appinvite_service": {
          "status": 1,
          "other_platform_oauth_client": []
        },
        "ads_service": {
          "status": 1
        }
      }
    }
  ],
  "configuration_version": "1"
}

对于 Firebase 数据库,您将在 project_info 节点中有一个 firebase_url 设置:

"firebase_url": "https://yourprojectname.firebaseio.com",

如果您不想修改 google-services.json,您还可以在应用程序启动时在代码中指定 URL,如我在此处的回答所示:.