File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,9 @@ - (void)showSignInAlertWithEmail:(NSString *)email
230230 UIAlertAction *cancelAction =
231231 [UIAlertAction actionWithTitle: [FIRAuthUIStrings cancel ]
232232 style: UIAlertActionStyleCancel
233- handler: nil ];
233+ handler: ^(UIAlertAction * _Nonnull action) {
234+ [self .authUI signOutWithError: nil ];
235+ }];
234236 [alertController addAction: cancelAction];
235237 [self presentViewController: alertController animated: YES completion: nil ];
236238 } else {
@@ -241,7 +243,9 @@ - (void)showSignInAlertWithEmail:(NSString *)email
241243 cancelButtonTitle: [FIRAuthUIStrings cancel ]
242244 otherButtonTitles: provider.signInLabel, nil ];
243245 FIRAuthUIAlertViewDelegate *delegate =
244- [[FIRAuthUIAlertViewDelegate alloc ] initWithCancelHandler: nil otherHandlers: @[ handler ]];
246+ [[FIRAuthUIAlertViewDelegate alloc ] initWithCancelHandler: ^{
247+ [self .authUI signOutWithError: nil ];
248+ } otherHandlers: @[ handler ]];
245249 alertView.delegate = delegate;
246250 [alertView show ];
247251 }
You can’t perform that action at this time.
0 commit comments