Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在firebase REST中设置databaseAuthVariableOverride_C#_Firebase_Firebase Realtime Database_Firebase Authentication - Fatal编程技术网

C# 如何在firebase REST中设置databaseAuthVariableOverride

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

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.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,那么您可以为该调用提供支持,这基本上会给您相同的结果