我有一个 .NET 应用程序(不是 Web 应用程序),其中用户已通过 Google 授权进行身份验证,因此已颁发 token 。
我希望此应用将用户数据存储到 Firebase,并使用类型为“$user_id === auth.uid”的用户读写安全规则。
由于您可以通过 Google 向 Firebase 进行身份验证,因此应用程序是否可以将 Google 已颁发的 token 传递给 Firebase?
最佳答案
Firebase REST API 仅接受 Firebase JWT token 。您可以使用libraries Firebase provides之一从Google token 中获取信息并从中创建JWT。为了这个目的。
这在 User Authentication section of the Firebase documentation 中有介绍。 .
关于.net - 将 Google 身份验证 token 与 Firebase 结合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33958530/