Firebase – 添加新应用将使其他应用的 Google 服务失效。

huangapple go评论56阅读模式
英文:

Firebase - Adding a new app will invalidate google services on others

问题

我们有一个Firebase项目,其中包括多个Android/iOS应用程序。

我们使用Firebase进行社交登录和推送通知。

所有应用程序都使用相同的google_services.json文件和相同的Firebase项目。

现在我们的客户想发布一个额外的应用程序,所以我们应该添加一个新的Android应用程序并提供其指纹。

问题是:我们是否需要更新所有其他Android和iOS应用程序以继续使用Firebase服务,还是可以部署具有更新后的google_services.json的新应用程序而不会出现其他问题?

谢谢。

英文:

We have a firebase project with multiple Android / iOS apps.

We use firebase for social logins and push notifications.

All the apps are using the same google_services.json and the same Firebase project.

Now our client wants to release an additional app, so we should add a new App Android with its fingerprint.

The question is: We'll have to update all the others Android and iOS apps to continue to use the Firebase services, or we can deploy the new app with the updated google_services.json without other issues?

Thank you

答案1

得分: 0

如果您查看现有的 google-service.json 文件,您会发现它们包含一组固定的数据。这些数据主要包括持久的项目信息和客户端数据列表。

当您添加新的应用程序时,该应用程序的客户端信息将附加到现有列表中。

应用程序只关注它们自己的包名称。因此,当添加新应用程序时,不会影响现有的应用程序。它们只关注存储在 google-service.json 文件中的它们自己的凭据。

为了检查这一点,您可以执行一个简单的测试。选择您现有的一个应用程序,从 google-service.json 文件中删除与另一个应用程序相关联的客户端信息,然后查看是否一切都按预期工作。这将确认每个应用程序在 google-service.json 文件中只需要其自己特定的凭据。

因此,在您的情况下,添加额外的客户端应该会产生相同的结果。

英文:

If you look into the existing google-service.json files, you'll see that they contain a fixed set of data. This data consists mainly of persistent project information and a list of client data.

When you add a new application, the client information for that application is appended to the existing list.

Applications are only concerned with their own package names. So when a new application is added, the existing applications are not affected. They are only concerned with their own credentials, which are stored in the google-service.json file.

To check this, you can perform a simple test. Select one of your existing applications, remove the client information associated with another application from the google-service.json file, and see if everything continues to work as expected. This will confirm that each application only requires its own specific credentials within the google-service.json file.

So in your case the other way around, having additional clients added, should be the same result.

huangapple
  • 本文由 发表于 2023年6月13日 16:55:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/76463230.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定