diff --git a/GoogleSignIn/Sources/GIDAuthStateMigration.m b/GoogleSignIn/Sources/GIDAuthStateMigration.m index 4df01d11..0ccd979a 100644 --- a/GoogleSignIn/Sources/GIDAuthStateMigration.m +++ b/GoogleSignIn/Sources/GIDAuthStateMigration.m @@ -107,10 +107,6 @@ - (void)performDataProtectedMigrationIfNeeded { if (authSession) { NSError *err; [self.keychainStore saveAuthSession:authSession error:&err]; - // If we're unable to save to the keychain, return without marking migration performed. - if (err) { - return; - }; [keychainStoreLegacy removeAuthSessionWithError:nil]; } @@ -138,10 +134,6 @@ - (void)performGIDMigrationIfNeededWithTokenURL:(NSURL *)tokenURL if (authSession) { NSError *err; [self.keychainStore saveAuthSession:authSession error:&err]; - // If we're unable to save to the keychain, return without marking migration performed. - if (err) { - return; - }; } // Mark the migration check as having been performed. diff --git a/GoogleSignIn/Tests/Unit/GIDAuthStateMigrationTest.m b/GoogleSignIn/Tests/Unit/GIDAuthStateMigrationTest.m index 6379fb4f..1a482657 100644 --- a/GoogleSignIn/Tests/Unit/GIDAuthStateMigrationTest.m +++ b/GoogleSignIn/Tests/Unit/GIDAuthStateMigrationTest.m @@ -181,7 +181,7 @@ - (void)testMigrateIfNeeded_KeychainFailure_DataProtectedMigration { callbackPath:kCallbackPath keychainName:kKeychainName isFreshInstall:NO]; - XCTAssertNotNil([_realLegacyGTMKeychainStore retrieveAuthSessionWithError:nil]); + XCTAssertNil([_realLegacyGTMKeychainStore retrieveAuthSessionWithError:nil]); } #else