C# 如何在firebase REST中设置databaseAuthVariableOverride
Firebase具有允许使用自定义auth变量初始化连接的功能 示例中的链接:C# 如何在firebase REST中设置databaseAuthVariableOverride,c#,firebase,firebase-realtime-database,firebase-authentication,C#,Firebase,Firebase Realtime Database,Firebase Authentication,Firebase具有允许使用自定义auth变量初始化连接的功能 示例中的链接: # Fetch the service account key JSON file contents cred = credentials.Certificate('path/to/serviceAccountKey.json') # Initialize the app with a custom auth variable, limiting the server's access firebase_admin
# Fetch the service account key JSON file contents
cred = credentials.Certificate('path/to/serviceAccountKey.json')
# Initialize the app with a custom auth variable, limiting the server's access
firebase_admin.initialize_app(cred, {
'databaseURL': 'https://databaseName.firebaseio.com',
'databaseAuthVariableOverride': {
'uid': 'my-service-worker'
}
})
我正在使用c#,这是一种没有SDK的语言。。。。我选择使用RESTAPI,但在文档中没有找到如何使用上述代码中的功能
有一种方法可以在Firebase的REST中使用databaseAuthVariableOverride?此功能仅在Firebase实时数据库的管理SDK中可用,该数据库应在受信任的环境中运行 如果您正在使用另一个SDK或RESTAPI,它将不可用,因为如果用户可以设置自己的UID,这将是一个重大的安全风险 如果您是从受信任的环境调用RESTAPI,那么您可以为该调用提供支持,这基本上会给您相同的结果