Skip to content

Commit f081297

Browse files
authored
Attempt migrations once (#528)
1 parent 594f8b7 commit f081297

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

GoogleSignIn/Sources/GIDAuthStateMigration.m

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ - (void)performDataProtectedMigrationIfNeeded {
107107
if (authSession) {
108108
NSError *err;
109109
[self.keychainStore saveAuthSession:authSession error:&err];
110-
// If we're unable to save to the keychain, return without marking migration performed.
111-
if (err) {
112-
return;
113-
};
114110
[keychainStoreLegacy removeAuthSessionWithError:nil];
115111
}
116112

@@ -138,10 +134,6 @@ - (void)performGIDMigrationIfNeededWithTokenURL:(NSURL *)tokenURL
138134
if (authSession) {
139135
NSError *err;
140136
[self.keychainStore saveAuthSession:authSession error:&err];
141-
// If we're unable to save to the keychain, return without marking migration performed.
142-
if (err) {
143-
return;
144-
};
145137
}
146138

147139
// Mark the migration check as having been performed.

GoogleSignIn/Tests/Unit/GIDAuthStateMigrationTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ - (void)testMigrateIfNeeded_KeychainFailure_DataProtectedMigration {
181181
callbackPath:kCallbackPath
182182
keychainName:kKeychainName
183183
isFreshInstall:NO];
184-
XCTAssertNotNil([_realLegacyGTMKeychainStore retrieveAuthSessionWithError:nil]);
184+
XCTAssertNil([_realLegacyGTMKeychainStore retrieveAuthSessionWithError:nil]);
185185
}
186186

187187
#else

0 commit comments

Comments
 (0)