c# - Firestore REST 身份验证

标签 c# rest google-cloud-firestore

我正在尝试将 firestore 与 c# 结合使用,但唯一允许这样做的库处于预发布状态并且需要通过环境变量进行身份验证。因此,在阅读完文档后,我开始研究 REST API。我的问题是,由于我无法设置打开规则的应用程序,我需要某种形式的身份验证。我想知道我是否可以做这样的事情

https://firestore.googleapis.com/v1beta1/projects/YOUR_PROJECT_ID/databases/(default)/documents/cities/LA?auth=MY_AUTH_KEY

最佳答案

documentation for the Firestore REST API描述了使用 Firebase Auth token 进行身份验证所需执行的操作:

After you obtain either a Firebase ID token or a Google Identity OAuth 2.0 token, pass it to the Cloud Firestore endpoints as an Authorization header set to Bearer {YOUR_TOKEN}.

关于c# - Firestore REST 身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50686107/

相关文章:

c# - CloudBlob.OpenRead() 未读取所有数据

java - Spring Boot 休息 NioSocketWrapper.getSslSupport NullPointerException

javascript - 如何在 Firebase 函数中构造 GeoPoint

android - 使用 firebase unity sdk firestore 包时 Android 设备上出现错误

database - 减少请求的 Firestore 数据建模

c# - Filedialog CustomPlaces困惑

c# - 如何将一个 "clone"对象转化为子类对象?

c# - Rhino Mocks - 测试存储库层返回 "object reference not set to instance"错误

oauth - 使用 OAuth 保护我的 REST API,同时仍然允许通过第三方 OAuth 提供商进行身份验证(使用 DotNetOpenAuth)

JAVA RESTFull服务器获取POST数据,其中 "%"(百分比)作为值@FormParam