Last active
January 3, 2017 13:47
-
-
Save bezysoftware/e0619ec963ae749bcee7a4e060ed86ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // authenticate user with facebook and use the access token | |
| var token = "access_token_xyz"; | |
| // specify your app’s client key when creating the auth provider | |
| var ap = new FirebaseAuthProvider(new FirebaseAuthConfig("<YOUR APP API KEY>")); | |
| // sign in with OAuth. You can also sign in anonymously | |
| var auth = ap.SignInWithOAuth(FirebaseAuthType.Facebook, token); | |
| var firebase = new FirebaseClient( | |
| "https://dinosaur-facts.firebaseio.com/", | |
| new FirebaseOptions | |
| { | |
| AuthTokenAsyncFactory = () => auth.FirebaseToken | |
| }); | |
| var dinos = await firebase | |
| .Child(“dinosaurs”) | |
| .OnceAsync<Dinosaur>(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment