Skip to content

Commit

Permalink
Fix - webview is shown after cancellation from the app. (#13)
Browse files Browse the repository at this point in the history
* It should just validate that's the proper callback url

* remove redundancy

* remove dead code
  • Loading branch information
fxsalazar authored May 16, 2020
1 parent aa17aff commit baac2e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion TwitterKit/TwitterKit/Social/Identity/TWTRLoginURLParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (BOOL)isMobileSSOSuccessURL:(NSURL *)url
- (BOOL)isMobileSSOCancelURL:(NSURL *)url
{
BOOL properScheme = [self isTwitterKitRedirectURL:url];
BOOL cancelState = (url.host == nil) && properScheme;
BOOL cancelState = (url.host == nil);

BOOL isCancelURL = properScheme && cancelState;

Expand Down
4 changes: 1 addition & 3 deletions TwitterKit/TwitterKit/Social/Identity/TWTRMobileSSO.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ - (BOOL)isWebWithSourceApplication:(NSString *)sourceApplication
- (BOOL)isSSOWithURL:(NSURL *)url
{
if (url == nil) return NO;
return [url.host containsString:@"secret="] &&
[url.host containsString:@"secret="] &&
[url.host containsString:@"username="] ;
return [self.loginURLParser isTwitterKitRedirectURL:url];
}

- (BOOL)isWebWithURL:(NSURL *)url
Expand Down

0 comments on commit baac2e3

Please sign in to comment.