user3223843
user3223843

Reputation: 375

SFSafariViewController OAuth implementation

In the apple WWDC 2015-504, the SFSafariViewController has been announced. Ricky Mondello claimed that the new secure, stable, and fast embedded Safari browser is capable of creating authentication flows, with two easy steps, passing though AppDelegate.

I wanted to give it a try, so i searched a bit on the implementation for OAuth2 using SFSafariViewController... I found almost nothing. There are plenty of articles explaining why the SF(...) is better than a UIWebView and so on, but i couldn't find a working implementation, not even in GitHub.

I tried to open a simple url such as "http://www.google.com" and everything works just fine.

I wanted to go one step further: i've tried implemented login with OAuth in order to receive the auth token (first step of flow). So sent my SF(...) to "https://website.com/auth?ID=...&access=..." and set as redirect URI testApp:// (The name of my app).

I was expecting to see the request in - application:openURL:sourceApplication:annotation: but nothing at all happened. I've also added "testApp" in 'LSApplicationQueriesSchemes' but i have had no luck.

It's been one day struggling on this problem, and i would really like to know what am i doing wrong.

Thanks.

Upvotes: 3

Views: 1709

Answers (1)

user3223843
user3223843

Reputation: 375

After another day, i can assume that the iOS 9.0.2 Jailbreak was causing the url scheme issue.

Upvotes: 1

Related Questions