rlamasb / Firebase.Xamarin

Light weight wrapper for Firebase Realtime Database REST API.
MIT License
149 stars 39 forks source link

Custom Firebase Exceptions #18

Closed se1exin closed 7 years ago

se1exin commented 7 years ago

Includes @b8ne's custom exceptions for Firebase HTTP errors (see issue #15) and @jquaglio's Push Notification Pull Request

se1exin commented 7 years ago

@rlamasb any plans on merging this PR?? Issues #6, #12, #15, and #21 could all benefit from the PR ...just saying.

pallavbohara commented 7 years ago

@rlamasb var firebase = new FirebaseClient("https://XXXXXX-bdded.firebaseio.com/test"); var authProvider = new FirebaseAuthProvider(new FirebaseConfig("AIzaxxxxxxxxxxxxxxXE")); var auth = await authProvider.SignInWithEmailAndPasswordAsync("pal@gmail.com", "abc@1234"); var item =await firebase .Child("MyMeetings") .WithAuth(auth.FirebaseToken) .PostAsync("Please Post me"); DATABASE Rules are:- { "rules": { "test":{ "$uid": { ".read": "auth.uid == $uid", ".write": "auth.uid == $uid", } } } }

Its throwing 401 unauthorized error. Please help me out. Don't know how to contact you thats why posting here.

thesultanster commented 6 years ago

@rlamasb @se1exin I am using the nuget package version 0.3.6 however it doesn't have the Firebase exception in the library code. I'm new to this. How can I make use of the new exceptions?