I'm trying to implement an OAuth2 authorization code flow as part of my iOS app. I open the third party's OAuth2 login page in an SFSafariViewController, and the url that I pass to the Safari controller includes an https redirect uri that is a universal link. When the user hasn't done an OAuth2 login recently, the Safari controller displays the login page, the user presses the "log in" button, and then the redirect uri is followed as a universal link, bringing control back to the app, as expected. (The user doesn't enter credentials on the third party's page because Safari has already cached them.)
The problem is that, if I immediately try to repeat that process, the Safari controller does not appear to open the third party's login page, and, judging by the hostname displayed at the top of the screen, it tries to go straight to the redirect uri, which doesn't get treated as a universal link this time. The Safari controller just shows a 403 error because the uri doesn't correspond to any real webpage.
Does anyone know the cause of and/or the solution to this problem? I suspect that it may have to do with this behavior documented by Apple (https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html):
If you instantiate a SFSafariViewController, WKWebView, or UIWebView object to handle a universal link, iOS opens your website in Safari instead of opening your app. However, if the user taps a universal link from within an embedded SFSafariViewController, WKWebView, or UIWebView object, iOS opens your app.
That doesn't entirely explain why it works in the first case but not in the second, and it doesn't explain how I might prevent the second case from happening.
I am investigating ways to open the FB app using a URL Schema. I want to open my app directly to the Search Page and automatically fill the search bar. I am not seeing the search page covered in the URL Schemas:
URL Scheme to open a post in facebook app
Currently, my app is able to go to the search page by creating a custom hyperlink through code and launching Safari. However, most people are not logged into FB through Safari so this causes me issues.
Any thoughts?
I am working on a react-native app that uses the Spotify api.
Long story short, I had to use the LiknkingIOS Library to open the auth page in the Safari app and get the necessary tokens and all works, I even got to redirect to my app one the user is successfully authenticated using a custom URL scheme.
The only problem is that a prompt saying "Open in 'myApp'?" appears.
I need help figuring out a way to avoid the prompt from appearing or using another component to open Spotify's auth page without leaving the app.
When this link (http://bit.ly/1C3e7e7) is clicked within the Facebook app, I am promoted with a warning that I'm about to open another app, but then nothing happens.
Does Facebook not allow redirects to other apps even though they have the alert warning users that the redirect is about to take place?
Instagram sent me a link via sms to reset my password. The link was "instagram://....". Obviously it is supposed to open up in the instagram app when I click on it, but it doesn't. How do I launch this link to open something up inside the app?