Call a custom URL scheme (myapp://) from a Firebase Cloud Function

402 Views Asked by At

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.

0

There are 0 best solutions below