I'm working on a website that is focused on mobile users and uses a manifest to be opened standalone when added to the home screen. This works well, except for the Facebook login function. Whenever I try to login it opens the Facebook link in the browser outside the app. I then have to manually return to the app and reload the page to be logged on.
How can I stay inside the standalone app when logging in?
I tried using window.location
as explained in this popular answer but no change. I also tried using window.open
as explained here but again, no luck.
You can try it on this test page that has an adjusted manifest and login option to stay inside the test page. I used a Samsung Galaxy S5 for testing.
Hit your profile picture in the top left corner, then tap Settings and privacy > Display and sound. In the “Web browser” section, you will see the option “Use in-app browser.” Please disable it. That's it.
Embedded browsers are software components available to mobile apps to invoke the browser, and are the only ways both platforms allow users to interact with a browser. It's important to emphasize – we used each platform's embedded browser, not our own browser.
You should not stay inside your app while logging.
Redirecting the user to the Identity provider (Facebook) in your case it is the normal life-cycle of an Oauth2 login or Single Sign On login. On the OAuth2 server you can set the redirect url which is the address you want the user to be send after login.
https://developers.facebook.com/docs/facebook-login/web#redirecturl
Login to your facebook app account: https://developers.facebook.com/apps and change the redirect url from your app control panel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With