Instagram WebView is blocking FB Signin

I have a link to my Instagram bio. When an iOS user clicks on a link and is redirected to my company site via Instagram WebView, the user is unable to connect to their account via Facebook. It just redirects them back to the same page after logging into FB. This issue does not occur on Android or in a web browser - only when it is in a browser in an application.

I tried to use a function to define a URL with a .location.url box that the user is redirected from Instagram because the link in our Instagram app has a specific "Instagram" parameter. However, it doesn't look like the browser in the application detects window.location.url ..

Really stuck on this question and wondered if anyone has come across something like this.

+3


source to share


2 answers


Typically, most social authentications work from a window, usually a window appears.

Most iOS apps (the ones I've come across) like Reddit or Instagram don't allow pop-ups.

The solution should only use one page for authentication.

For example, if you are using Facebook Authentication, instead of the auth button displaying a dialog box for authentication, you should replace the current one window.location

with



https://www.facebook.com/v2.10/dialog/oauth?client_id={app-id}&redirect_uri={redirect-uri}

      

Once the user successfully grants permission, it will redirect_uri

redirect the user to your site with options you can use to retrieve the access token

See docs for Facebook reference https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow

+3


source


https://shoploganpaul.com/account/login is an example I found to work. Where you can use Instagram's own browser but can still login with Facebook.



And I think the big difference is that on mobile we are trying to open a new Facebook login page and it is stuck, which will stop Instagram completely. On the other hand, https://shoploganpaul.com/account/login seems to load it into an existing window and work successfully.

+1


source







All Articles