Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication via SFSafariViewController (iOS 9) and TMWebViewController (up to iOS 8) #112

Merged
merged 7 commits into from Aug 2, 2016

Conversation

shpuntov
Copy link
Contributor

Implemented method +- (void)authenticate:(NSString *)URLScheme fromViewController:(UIViewController *)fromViewController callback:(void(^)(NSError *))error; that allows to authenticate on iOS. For iOS up to 8 TMWebViewController is used (included in SDK, without XIB, code-only). From iOS 9, SFSafariViewController is used. Some minor refactoring included as well (TMSDKConstants.h contains a special error domain and error codes for the SDK).

@metasmile
Copy link

thanks. nice work! 👍

@brianmichel
Copy link
Contributor

Thanks for the request @shpuntov we'll get to looking at this soon!

@Pearapps
Copy link
Contributor

I worry about using a web view as a backup plan here because people could inject javascript and steal users passwords, should we just only allow it on iOS 9?

/*! @abstract Delegate callback called when the user taps the Done button. Upon this call, the view controller should be dismissed by caller. */
- (void)webViewControllerDidFinish:(TMWebViewController *)controller;

@end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a newline here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Pearapps
Copy link
Contributor

@shpuntov We will also need you to sign this form http://static.tumblr.com/zyubucd/GaTngbrpr/tumblr_corporate_contributor_license_agreement_v1__10-7-14.pdf and email to legal@tumblr.com so we can merge after all feedback is addressed!

thanks!

@shpuntov
Copy link
Contributor Author

@Pearapps If a developer wants to steal user passwords, he can always show UIWebView to a user and load your OAuth page URL. I'm afraid removing TMWebViewController from this pod can't help us to protect Tumblr users.

@Pearapps
Copy link
Contributor

@shpuntov Have you had a chance to send in the CLA form yet? Looking forward to getting this code in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants