You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+103-4Lines changed: 103 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -343,11 +343,105 @@ FirebaseDataSource acts as a generic data source by providing common information
343
343
344
344
## FirebaseUI Auth API
345
345
346
-
### FirebaseAuthProvider
346
+
### FirebaseAppDelegate
347
+
`FirebaseAppDelegate` is replacement for the standard `AppDelegate` and provides setup features necessary for authentication to work. If you plan on using FirebaseUI authentication features, your `AppDelegate` should subclass `FirebaseAppDelegate` like so:
`FirebaseLoginViewContoller` quickly adds a headful UI flow to your application. This flow supports email/password login, as well as social providers (Facebook, Google, Twitter). Using this, you can easily guide users through the login journey, get the current user's state, and log the user out. This view looks like:
409
+
410
+

var user: FAuthData = loginViewController.currentUser(); // Check the currently logged in user
440
+
...
441
+
loginViewController.logout(); // Log the current user out
442
+
```
347
443
348
-
`FirebaseAuthProvider` is a superclass for all identity providers, providing a default constructor `[FirebaseAuthProvider initWithRef:authDelegate:]` as well as `login`, `logout`, and `configureProvider` methods to facilitate standard authentication across providers. `login` and `configureProvider` are unimplemented in the base implementation and will thrown an exception if called, so each provider should override these methods. `logout` is implemented to unauthenticate the given Firebase reference, and should always be called using `[super logout]` at the end of any subclass implementation.
349
444
350
-
`FirebaseAuthProvider` also registers a singleton authentication listener that monitors the global authentication state across all providers and will route `authProvider:onLogin:` and `onLogout` events appropriately.
351
445
352
446
### FirebaseFacebookAuthProvider
353
447
@@ -370,7 +464,6 @@ facebookProvider.login()
370
464
...
371
465
facebookProvider.logout()
372
466
```
373
-
374
467
### FirebaseGoogleAuthProvider
375
468
376
469
`FirebaseGoogleAuthProvider` is a wrapper around Google login. To enable this, visit the Auth tab of your Firebase Dashboard and enable this provider by checking the checkbox, then [create a new Google Project](https://developers.google.com/identity/sign-in/ios/start), download `GoogleServices-Info.plist`, and include it in your projct. You will also have to add several URL schemes to your "Info.plist". For more information about setup, see the Firebase [Google authentication docs](https://www.firebase.com/docs/ios/guide/login/google.html).
@@ -439,6 +532,12 @@ passwordProvider.login()
439
532
440
533
## Understanding FirebaseUI Auth's Internals
441
534
535
+
### FirebaseAuthProvider
536
+
537
+
`FirebaseAuthProvider` is a superclass for all identity providers, providing a default constructor `[FirebaseAuthProvider initWithRef:authDelegate:]` as well as `login`, `logout`, and `configureProvider` methods to facilitate standard authentication across providers. `login` and `configureProvider` are unimplemented in the base implementation and will thrown an exception if called, so each provider should override these methods. `logout` is implemented to unauthenticate the given Firebase reference, and should always be called using `[super logout]` at the end of any subclass implementation.
538
+
539
+
`FirebaseAuthProvider` also registers a singleton authentication listener that monitors the global authentication state across all providers and will route `authProvider:onLogin:` and `onLogout` events appropriately.
540
+
442
541
### FirebaseAuthDelegate and TwitterAuthDelegate protocols
443
542
444
543
Every authentication event is plumbed through `FirebaseAuthDelegate`, which has four methods:
0 commit comments