0

I'm trying to make it possible to log into an iOS app with Instagram. I'm trying to do that with SFAuthenticationSession and unfortunately SFAuthenticationSession requires the callbackURL to be a custom one (like myapp://) and Instagram only allows http/https links as redirect URIs.

The solution I've come up with is to provide Instagram with a URL of a Firebase Cloud Function and do a redirect or another request in my cloud function to myapp://something.

The request module only makes http/https requests and I haven't found a way to simply call my custom URL.

As far as I have observed the SFAuthenticationSession's callback closure will only be called if the user cancels or if the thing detects a call to the provided callbackURLScheme.

Can you guys help me out? Thank you.

Zoltán Matók
  • 3,923
  • 2
  • 33
  • 64
  • Why not just use the sample provided by Firebase? https://github.com/firebase/functions-samples/tree/Node-8/instagram-auth – Jen Person Nov 15 '18 at 18:53
  • @JenPerson Thank you for replying. The problem is SFAuthenticationSession's seeming in-interoperability with Instagram. The workflow you've linked to doesn't help with that unfortunately, because I'm trying to present the login sheet from iOS, using that class. "Once Your app is created make sure you specify your app's callback URL in the list of Valid redirect URIs of your Instagram app." The problem is that I can only specify non-http/s URL schemes for the callbackURL of SFAuthenticationSession and Instagram doesn't allow me to record non-http/s redirect URIs. – Zoltán Matók Nov 15 '18 at 22:56

0 Answers0