@@ -47,8 +47,8 @@ Auth guides at the following links:
4747
4848### Configuration
4949
50- All operations, callbacks, UI customizations are done through an ` FIRAuthUI `
51- instance. The ` FIRAuthUI ` instance associated with the default ` FIRAuth `
50+ All operations, callbacks, UI customizations are done through an ` FUIAuth `
51+ instance. The ` FUIAuth ` instance associated with the default ` FIRAuth `
5252instance can be accessed as follows:
5353
5454``` swift
@@ -59,8 +59,8 @@ import FirebaseAuthUI
5959/* ... */
6060
6161FIRApp.configure ()
62- let authUI = FIRAuthUI .default ()
63- // You need to adopt a FIRAuthUIDelegate protocol to receive callback
62+ let authUI = FUIAuth .default ()
63+ // You need to adopt a FUIAuthDelegate protocol to receive callback
6464authUI? .delegate = self
6565```
6666
@@ -70,8 +70,8 @@ authUI?.delegate = self
7070@import FirebaseAuthUI
7171...
7272[FIRApp configure ];
73- FIRAuthUI *authUI = [FIRAuthUI defaultAuthUI ];
74- // You need to adopt a FIRAuthUIDelegate protocol to receive callback
73+ FUIAuth *authUI = [FUIAuth defaultAuthUI ];
74+ // You need to adopt a FUIAuthDelegate protocol to receive callback
7575authUI.delegate = self;
7676```
7777
@@ -83,10 +83,10 @@ import FirebaseGoogleAuthUI
8383import FirebaseFacebookAuthUI
8484import FirebaseTwitterAuthUI
8585
86- let providers: [FIRAuthProviderUI ] = [
87- FIRGoogleAuthUI (),
88- FIRFacebookAuthUI (),
89- FIRTwitterAuthUI (),
86+ let providers: [FUIAuthProvider ] = [
87+ FUIGoogleAuth (),
88+ FUIFacebookAuth (),
89+ FUITwitterAuth (),
9090]
9191self .authUI ? .providers = providers
9292```
@@ -95,12 +95,12 @@ self.authUI?.providers = providers
9595// objc
9696@import FirebaseGoogleAuthUI
9797@import FirebaseFacebookAuthUI
98- @import FIRTwitterAuthUI
98+ @import FUITwitterAuth
9999...
100- NSArray <id <FIRAuthProviderUI >> *providers = @[
101- [[FIRGoogleAuthUI alloc ] init ],
102- [[FIRFacebookAuthUI alloc ] init ],
103- [[FIRTwitterAuthUI alloc ] init ],
100+ NSArray <id <FUIAuthProvider >> *providers = @[
101+ [[FUIGoogleAuth alloc ] init ],
102+ [[FUIFacebookAuth alloc ] init ],
103+ [[FUITwitterAuth alloc ] init ],
104104 ];
105105_authUI.providers = providers;
106106```
@@ -119,7 +119,7 @@ Google/Facebook authentication process.
119119// swift
120120func application (_ app : UIApplication, open url : URL, options : [UIApplicationOpenURLOptionsKey : Any ]) -> Bool {
121121 let sourceApplication = options[UIApplicationOpenURLOptionsKey.sourceApplication ] as! String ?
122- if FIRAuthUI. default ()? .handleOpen (url, sourceApplication : sourceApplication) ?? false {
122+ if FUIAuth. defaultAuthUI ()? .handleOpen (url, sourceApplication : sourceApplication) ?? false {
123123 return true
124124 }
125125 // other URL handling goes here.
@@ -131,14 +131,14 @@ func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpe
131131// objc
132132- (BOOL )application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options {
133133 NSString * sourceApplication = options[ UIApplicationOpenURLOptionsSourceApplicationKey] ;
134- return [[ FIRAuthUI defaultAuthUI] handleOpenURL: url sourceApplication: sourceApplication ] ;
134+ return [[ FUIAuth defaultAuthUI] handleOpenURL: url sourceApplication: sourceApplication ] ;
135135}
136136```
137137
138138### Sign In
139139
140140To start the authentication flow, obtain an ` authViewController ` instance from
141- ` FIRAuthUI ` . In order to leverage FirebaseUI for iOS you must display the
141+ ` FUIAuth ` . In order to leverage FirebaseUI for iOS you must display the
142142` authViewController ` ; you can present it as the first view controller of your
143143app or present it from another view controller within your app. In order to
144144present the ` authViewController ` obtain as instance as follows:
@@ -149,7 +149,7 @@ present the `authViewController` obtain as instance as follows:
149149// Present the auth view controller and then implement the sign in callback.
150150let authViewController = authUI! .authViewController ()
151151
152- func authUI (_ authUI : FIRAuthUI , didSignInWith user : FIRUser? , error : Error ? ) {
152+ func authUI (_ authUI : FUIAuth , didSignInWith user : FIRUser? , error : Error ? ) {
153153 // handle user and error as necessary
154154}
155155```
@@ -160,7 +160,7 @@ UINavigationController *authViewController = [authUI authViewController];
160160// Use authViewController as your root view controller,
161161// or present it on top of an existing view controller.
162162
163- - (void )authUI:(FIRAuthUI *)authUI didSignInWithUser:(nullable FIRUser *)user error:(nullable NSError *)error {
163+ - (void )authUI:(FUIAuth *)authUI didSignInWithUser:(nullable FIRUser *)user error:(nullable NSError *)error {
164164 // Implement this method to handle signed in user or error if any.
165165}
166166```
@@ -209,21 +209,21 @@ should have the same key as its counterpart in the default `.strings` files.
209209You can customize everything about the authentication method picker screen,
210210except for the actual sign-in buttons and their position.
211211
212- In order to do so, create a subclass of ` FIRAuthPickerViewController ` and
213- customize it to your needs. Provide ` FIRAuthUI ` with an instance of your
212+ In order to do so, create a subclass of ` FUIAuthPickerViewController ` and
213+ customize it to your needs. Provide ` FUIAuth ` with an instance of your
214214subclass by implementing the delegate method
215215` authPickerViewControllerForAuthUI: ` as follows:
216216
217217``` swift
218218// swift
219- func authPickerViewController (for authUI : FIRAuthUI ) -> FIRAuthPickerViewController {
219+ func authPickerViewController (for authUI : FUIAuth ) -> FUIAuthPickerViewController {
220220 return CustomAuthPickerViewController (authUI : authUI)
221221}
222222```
223223
224224``` objective-c
225225// objc
226- - (FIRAuthPickerViewController *)authPickerViewControllerForAuthUI:(FIRAuthUI *)authUI {
226+ - (FUIAuthPickerViewController *)authPickerViewControllerForAuthUI:(FUIAuth *)authUI {
227227 return [[ CustomAuthPickerViewController alloc] initWithAuthUI: authUI ] ;
228228}
229229```
@@ -239,61 +239,61 @@ Things that are not customizable:
239239- modification of screen flow (you can't combine screens, skip particular screens)
240240- disabling validation (e g email validation)
241241
242- In order to achieve email provider screen customization, create subclass of appropriate controller and implement it to your needs. Provide ` FIRAuthUI ` with an instance of your
242+ In order to achieve email provider screen customization, create subclass of appropriate controller and implement it to your needs. Provide ` FUIAuth ` with an instance of your
243243subclass by implementing the delegate methods:
244244``` swift
245245// swift
246- func emailEntryViewController (for authUI : FIRAuthUI ) -> FIREmailEntryViewController {
246+ func emailEntryViewController (for authUI : FUIAuth ) -> FUIEmailEntryViewController {
247247 return CustomEmailEntryViewController (authUI : authUI)
248248}
249249
250- func passwordSignInViewController (for authUI : FIRAuthUI , email : String ) -> FIRPasswordSignInViewController {
250+ func passwordSignInViewController (for authUI : FUIAuth , email : String ) -> FUIPasswordSignInViewController {
251251 return CustomPasswordSignInViewController (authUI : authUI, email : email)
252252}
253253
254- func passwordSignUpViewController (for authUI : FIRAuthUI , email : String ) -> FIRPasswordSignUpViewController {
254+ func passwordSignUpViewController (for authUI : FUIAuth , email : String ) -> FUIPasswordSignUpViewController {
255255 return CustomPasswordSignUpViewController (authUI : authUI, email : email)
256256}
257257
258- func passwordRecoveryViewController (for authUI : FIRAuthUI , email : String ) -> FIRPasswordRecoveryViewController {
258+ func passwordRecoveryViewController (for authUI : FUIAuth , email : String ) -> FUIPasswordRecoveryViewController {
259259 return CustomPasswordRecoveryViewController (authUI : authUI, email : email)
260260}
261261
262- func passwordVerificationViewController (for authUI : FIRAuthUI , email : String , newCredential : FIRAuthCredential) -> FIRPasswordVerificationViewController {
262+ func passwordVerificationViewController (for authUI : FUIAuth , email : String , newCredential : FIRAuthCredential) -> FUIPasswordVerificationViewController {
263263 return CustomPasswordVerificationViewController (authUI : authUI, email : email, newCredential : newCredential)
264264}
265265
266266```
267267
268268``` objective-c
269269// objc
270- - (FIREmailEntryViewController *)emailEntryViewControllerForAuthUI:(FIRAuthUI *)authUI {
270+ - (FUIEmailEntryViewController *)emailEntryViewControllerForAuthUI:(FUIAuth *)authUI {
271271 return [[ CustomEmailEntryViewController alloc] initWithAuthUI: authUI ] ;
272272
273273}
274274
275- - (FIRPasswordSignInViewController *)passwordSignInViewControllerForAuthUI:(FIRAuthUI *)authUI
275+ - (FUIPasswordSignInViewController *)passwordSignInViewControllerForAuthUI:(FUIAuth *)authUI
276276 email:(NSString *)email {
277277 return [[ CustomPasswordSignInViewController alloc] initWithAuthUI: authUI
278278 email: email ] ;
279279
280280}
281281
282- - (FIRPasswordSignUpViewController *)passwordSignUpViewControllerForAuthUI:(FIRAuthUI *)authUI
282+ - (FUIPasswordSignUpViewController *)passwordSignUpViewControllerForAuthUI:(FUIAuth *)authUI
283283 email:(NSString *)email {
284284 return [[ CustomPasswordSignUpViewController alloc] initWithAuthUI: authUI
285285 email: email ] ;
286286
287287}
288288
289- - (FIRPasswordRecoveryViewController *)passwordRecoveryViewControllerForAuthUI:(FIRAuthUI *)authUI
289+ - (FUIPasswordRecoveryViewController *)passwordRecoveryViewControllerForAuthUI:(FUIAuth *)authUI
290290 email:(NSString *)email {
291291 return [[ CustomPasswordRecoveryViewController alloc] initWithAuthUI: authUI
292292 email: email ] ;
293293
294294}
295295
296- - (FIRPasswordVerificationViewController *)passwordVerificationViewControllerForAuthUI:(FIRAuthUI *)authUI
296+ - (FUIPasswordVerificationViewController *)passwordVerificationViewControllerForAuthUI:(FUIAuth *)authUI
297297 email:(NSString *)email
298298 newCredential:(FIRAuthCredential *)newCredential {
299299 return [[ CustomPasswordVerificationViewController alloc] initWithAuthUI: authUI
@@ -308,4 +308,4 @@ While customizing call original methods (see subclassed header). Most frequent b
308308- ` - (void)onBack; `
309309- ` - (void)cancelAuthorization; `
310310
311- You can refer to objective-c and swift samples to see how customization can be achieved.
311+ You can refer to objective-c and swift samples to see how customization can be achieved.
0 commit comments