Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove facebook 'already authenticating' error

  • Loading branch information...
commit 7266e64be90349d3b86b093f2a1c61a8faf605fa 1 parent fade284
@nwg nwg authored
View
6 Socialize/Classes/SocializeFacebookAuthHandler.m
@@ -52,12 +52,6 @@ - (void)authenticateWithAppId:(NSString*)appId
success:(void(^)())success
failure:(void(^)(NSError*))failure {
- if (self.authenticating) {
- // Authentication restarted before completion
- NSError *error = [NSError defaultSocializeErrorForCode:SocializeErrorFacebookAuthRestarted];
- [self failWithError:error];
- }
-
self.authenticating = YES;
self.facebook = [[[self.facebookClass alloc] initWithAppId:appId] autorelease];
self.permissions = permissions;
View
23 unitTests/Test Cases/SocializeFacebookAuthHandlerTests.m
@@ -96,29 +96,6 @@ - (void)testFailedAuthenticationCallsFailureHandler {
[self attemptAuthenticationAndWaitForStatus:kGHUnitWaitStatusFailure];
}
-- (void)testSecondAuthAttemptCausesErrorButStillRetries {
-
- [self ignoreFacebookAuthentication];
- [self attemptAuthenticationWithSuccess:^(NSString *accessToken, NSDate *expirationDate) {
- GHAssertTrue(NO, @"should not be called");
- } failure:^(NSError *error) {
- GHAssertTrue([error isSocializeErrorWithCode:SocializeErrorFacebookAuthRestarted], @"unexpected error");
- // This is the failure block that should be called after second attempt
- [self notify:kGHUnitWaitStatusFailure];
- }];
-
- [self prepare];
- [self ignoreFacebookAuthentication];
- [self attemptAuthenticationWithSuccess:^(NSString *accessToken, NSDate *expirationDate) {
- GHAssertTrue(NO, @"should not be called");
- } failure:^(NSError *error) {
- GHAssertTrue(NO, @"should not be called");
- }];
-
- [self waitForStatus:kGHUnitWaitStatusFailure timeout:1.0];
-
-}
-
- (void)testSharedHandler {
SocializeFacebookAuthHandler *handler = [SocializeFacebookAuthHandler sharedFacebookAuthHandler];
GHAssertNotNil(handler, @"");
Please sign in to comment.
Something went wrong with that request. Please try again.