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
Conversation
…on through a UIWebView
Error domain, error codes and keys created for TMTumblrSDK
…WebViewController
thanks. nice work! 👍 |
Thanks for the request @shpuntov we'll get to looking at this soon! |
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@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! |
@Pearapps If a developer wants to steal user passwords, he can always show |
@shpuntov Have you had a chance to send in the CLA form yet? Looking forward to getting this code in! |
Implemented method
+- (void)authenticate:(NSString *)URLScheme fromViewController:(UIViewController *)fromViewController callback:(void(^)(NSError *))error;
that allows to authenticate on iOS. For iOS up to 8TMWebViewController
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).