Dismiss auth controller on UI thread

This commit is contained in:
chrwend
2016-04-28 14:43:59 -07:00
parent e8d6d89b08
commit 7f6f355d80

View File

@@ -523,8 +523,9 @@ static unsigned char kBITPNGEndChunk[4] = {0x49, 0x45, 0x4e, 0x44};
if (authToken) {
identified = YES;
[self storeInstallationIdentifier:authToken withType:self.identificationType];
[self dismissAuthenticationControllerAnimated:YES completion:nil];
self.authenticationController = nil;
dispatch_async(dispatch_get_main_queue(), ^{
[self dismissAuthenticationControllerAnimated:YES completion:nil];
});
BOOL success = [self addStringValueToKeychain:email forKey:kBITAuthenticatorUserEmailKey];
if (!success) {
[self alertOnFailureStoringTokenInKeychain];