--- a/Plugins/Purple Service/AIPurpleGTalkAccount.m Wed Apr 01 20:30:40 2015 +0200
+++ b/Plugins/Purple Service/AIPurpleGTalkAccount.m Wed Apr 01 21:07:40 2015 +0200
@@ -221,6 +221,17 @@
AILogWithSignature(@"%@", responseDict);
+ if ([responseDict objectForKey:@"error"]) { + // Delete the refresh token, so we don't use it again. + [[AIKeychain defaultKeychain_error:NULL] deleteGenericPasswordForService:self.service.serviceID + [self setLastDisconnectionError:[NSString stringWithFormat:AILocalizedString(@"Retrieving OAuth token failed: %@", nil), [responseDict objectForKey:@"error_description"]]]; + [self serverReportedInvalidPassword]; NSString *jsonWebToken = [responseDict objectForKey:@"id_token"];
@@ -291,7 +302,6 @@
-(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
[self setLastDisconnectionError:[NSString stringWithFormat:AILocalizedString(@"OAuth authentication failed: %@", nil), error.description]];
- [self setValue:[NSNumber numberWithBool:YES] forProperty:@"isDisconnecting" notify:NotifyNow];
- (void)retrievePasswordThenConnect