स्विफ्ट + वाष्प ढांचे के माध्यम से firebase डाटाबेस तक नहीं पहुंच सकता, लेकिन मैं अनुमति नहीं दी मिलता है।HTTP/बाकी त्रुटि 403 निषिद्ध सर्वर + Xcode 8.1</p> <p>मैं Firebase रीयलटाइम मेरी डीबी के HTTP बनाने डाटाबेस को पढ़ने के लिए कोशिश कर रहा हूँ के लिए
ये कदम हैं:
1. जेडब्ल्यूटी "console.developers.google.com" से
2. भेजने पोस्ट OAuth2 सर्वर से अनुरोध करता है और प्राप्त पहुँच टोकन
3. भेजने डाउनलोड किया गुप्त कुंजी के साथ इस पर हस्ताक्षर बनाने OAuth2 सर्वर से प्राप्त टोकन के साथ डेटाबेस को फायरबेस डेटाबेस के लिए अनुरोध प्राप्त करें।
मैं "अनुमति अस्वीकृत", HTTP/1.1 403 निषिद्ध
// the header of the JSON Web Token (first part of the JWT)
let headerJWT = ["alg":"RS256","typ":"JWT"]
// the claim set of the JSON Web Token
let jwtClaimSet =
["iss":"[email protected]",
"scope":"https://www.googleapis.com/auth/firebase.database", //is this the correct API to access firebase database?
"aud":"https://www.googleapis.com/oauth2/v4/token",
"exp": expDate,
"iat": iatDate]
drop.get("access") { request in
var accesstoken = "ya29.ElqhA-....XXXX"
let responseFirebase = try drop.client.get("https://fir- 30c9e.firebaseio.com/data/Users.json",
headers: ["Authorization":"Bearer \(accesstoken)"],
query: [:])
print("FirebaseResponse_is \(responseFirebase)")
return "success"
}
@frank वैन puffelen तुम क्यों मैं अपने Firebase डेटाबेस के लिए उपयोग नहीं मिल सकता है के रूप में अपनी राय शेड कृपया सकते हैं पाया? – bibscy