IFirebaseConfig config = new FirebaseConfig();
config.Serializer = new ServiceStackJsonSerializer(); //Register ServiceStack.Text
config.Serializer = new JsonNetSerializer(); //Register Json.Net
config.AuthSecret = "authsecret here";
config.BasePath = "https://xyz.firebaseio.com/";
IFirebaseClient client = new FirebaseClient(config);
FirebaseResponse response = client.Get("abc/pqr");
Context.Response.Flush();
Context.Response.Write(response.ToString());
我在响应中收到错误“无法解析身份验证令牌”,我正在使用FireSharp库并尝试从firebase数据库检索数据
1条答案
按热度按时间fruv7luv1#
我发现你没有在firebaseconfig中定义auth密钥。请参阅github project。