diff --git a/Example/Auth/Sample/MainViewController+OAuth.m b/Example/Auth/Sample/MainViewController+OAuth.m index c6a36019458..88c39942c22 100644 --- a/Example/Auth/Sample/MainViewController+OAuth.m +++ b/Example/Auth/Sample/MainViewController+OAuth.m @@ -29,10 +29,6 @@ - (StaticContentTableViewSection *)oAuthSection { return [StaticContentTableViewSection sectionWithTitle:@"OAuth" cells:@[ [StaticContentTableViewCell cellWithTitle:@"Sign in with Google" action:^{ [weakSelf signInGoogleHeadfulLite]; }], - [StaticContentTableViewCell cellWithTitle:@"Link with Google" - action:^{ [weakSelf linkWithGoogleHeadfulLite]; }], - [StaticContentTableViewCell cellWithTitle:@"Reauthenticate with Google" - action:^{ [weakSelf reauthenticateWithGoogleHeadfulLite]; }], [StaticContentTableViewCell cellWithTitle:@"Sign in with Twitter" action:^{ [weakSelf signInTwitterHeadfulLite]; }], [StaticContentTableViewCell cellWithTitle:@"Sign in with GitHub" @@ -79,68 +75,6 @@ - (void)signInGoogleHeadfulLite { }]; } -- (void)linkWithGoogleHeadfulLite { - FIROAuthProvider *provider = self.googleOAuthProvider; - provider.customParameters = @{ - @"prompt" : @"consent", - }; - provider.scopes = @[ @"profile", @"email", @"https://www.googleapis.com/auth/plus.me" ]; - [self showSpinner:^{ - [[AppManager auth].currentUser linkWithProvider:provider - UIDelegate:nil - completion:^(FIRAuthDataResult *_Nullable authResult, - NSError *_Nullable error) { - [self hideSpinner:^{ - if (error) { - [self logFailure:@"Reauthenticate with provider (Google) failed" error:error]; - } else if (authResult.additionalUserInfo) { - [self logSuccess:[self stringWithAdditionalUserInfo:authResult.additionalUserInfo]]; - if (self.isNewUserToggleOn) { - NSString *newUserString = authResult.additionalUserInfo.newUser ? - @"New user" : @"Existing user"; - [self showMessagePromptWithTitle:@"New or Existing" - message:newUserString - showCancelButton:NO - completion:nil]; - } - } - [self showTypicalUIForUserUpdateResultsWithTitle:@"Link Error" error:error]; - }]; - }]; - }]; -} - -- (void)reauthenticateWithGoogleHeadfulLite { - FIROAuthProvider *provider = self.googleOAuthProvider; - provider.customParameters = @{ - @"prompt" : @"consent", - }; - provider.scopes = @[ @"profile", @"email", @"https://www.googleapis.com/auth/plus.me" ]; - [self showSpinner:^{ - [[AppManager auth].currentUser reauthenticateWithProvider:provider - UIDelegate:nil - completion:^(FIRAuthDataResult *_Nullable authResult, - NSError *_Nullable error) { - [self hideSpinner:^{ - if (error) { - [self logFailure:@"Link with provider (Google) failed" error:error]; - } else if (authResult.additionalUserInfo) { - [self logSuccess:[self stringWithAdditionalUserInfo:authResult.additionalUserInfo]]; - if (self.isNewUserToggleOn) { - NSString *newUserString = authResult.additionalUserInfo.newUser ? - @"New user" : @"Existing user"; - [self showMessagePromptWithTitle:@"New or Existing" - message:newUserString - showCancelButton:NO - completion:nil]; - } - } - [self showTypicalUIForUserUpdateResultsWithTitle:@"Reauthenticate Error" error:error]; - }]; - }]; - }]; -} - - (void)signInTwitterHeadfulLite { FIROAuthProvider *provider = self.twitterOAuthProvider; [self showSpinner:^{