mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-15 08:56:55 +00:00
Merge pull request #61 from Newstex/pull-requests/auth-skip-cleanup
fix didSkipOptionalLogin not cleaned up properly
This commit is contained in:
@@ -539,7 +539,7 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
|
||||
- (void) cleanupInternalStorage {
|
||||
[self removeKeyFromKeychain:kBITAuthenticatorAuthTokenKey];
|
||||
[self removeKeyFromKeychain:kBITAuthenticatorAuthTokenTypeKey];
|
||||
[self removeKeyFromKeychain:kBITAuthenticatorDidSkipOptionalLogin];
|
||||
[[NSUserDefaults standardUserDefaults] removeObjectForKey:kBITAuthenticatorDidSkipOptionalLogin];
|
||||
[self setLastAuthenticatedVersion:nil];
|
||||
}
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ static void *kInstallationIdentification = &kInstallationIdentification;
|
||||
- (void) testThatCleanupWorks {
|
||||
[_sut setAuthenticationToken:@"MyToken" withType:@"udid"];
|
||||
_sut.lastAuthenticatedVersion = @"1.2";
|
||||
[_sut setDidSkipOptionalLogin:YES];
|
||||
|
||||
[_sut cleanupInternalStorage];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user