From b111622b27b6622208b8c6dd8a9f3e53a591bb7e Mon Sep 17 00:00:00 2001 From: Nicola Salmoria Date: Tue, 10 Jul 2018 13:56:27 -0700 Subject: [PATCH] Fix handling of SFSafariViewController redirect JIRA Issues: PUBPL-1894 --- TwitterKit/TwitterKit/Social/Identity/TWTRLoginURLParser.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TwitterKit/TwitterKit/Social/Identity/TWTRLoginURLParser.m b/TwitterKit/TwitterKit/Social/Identity/TWTRLoginURLParser.m index 97dda053..909b651b 100644 --- a/TwitterKit/TwitterKit/Social/Identity/TWTRLoginURLParser.m +++ b/TwitterKit/TwitterKit/Social/Identity/TWTRLoginURLParser.m @@ -80,6 +80,9 @@ - (BOOL)isOauthTokenVerifiedFromURL:(NSURL *)url { NSDictionary *parameters = [TWTRNetworkingUtil parametersFromQueryString:url.absoluteString]; NSString *token = parameters[TWTRAuthOAuthTokenKey]; + if (token == nil) { + token = parameters[TWTRAuthAppOAuthDeniedKey]; + } return [[[TWTRTwitter sharedInstance] sessionStore] isValidOauthToken:token]; }