I have a web application that can be installed as PWA. Once installed the problem appears on Android devices with Chrome.
If a user is logged out the application will redirect to an authentication service that is hosted on a separate server. Once a user has logged in the application redirect him to main page of app. PWA is opened automatically at this point. I don't want this.
Does anybody know a way to prevent automatically opening PWA when a user open a site in browser?
It was noticed on Android 8.0 with Google Chrome 74.0.3729.157.
Also if an authentication page is rendered inside iframe PWA is not opened automatically.
Finally I get it.
PWA is installed as WebAPK so Android open my application automatically when an auth server returns redirect to my application https://developers.google.com/web/fundamentals/integration/webapks.
A way exists to prevent that by defining a scope parameter in manifest.json. But it is not my case because all my application is in the root.
Finally I use iframe to render an auth page instead of redirection to auth service directly.
Related
I have a sveltekit webapp using pocketbase that stores the authentication in cookies. If I use the browser on android normally, opening page and going to the vercel deployed page the authentication cookie works normally. If i close browser, clear tabs and everything if i come back it still automatically logs in. So far so good.
However when I pin my application with "add to desktop" the cookies disappear and I need to login again every time I open the application through the desktop shortcut ?
What am I missing? How can I better debug this issue?
I have created a webapp where I use passport.js google strategy everything works well. the only problem is when I set display mode to standalone in manifest and then install the PWA app next time when I try to login using google Oauth the redirect callback link opens in pwa app and this break the login returns internal server error
How can I fix this everything works as expected in display mode browser
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.
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.
I want to check if an app is installed in iphone or not from web page using javascript. If app is installed then i want to show "open" button in website, once if user clicks "open" button in website then i have to open an app in iphone by custom url scheme. If app is not installed then i want to show "Download" button in web page. How to do this?
I had tried javascript with setTimeout function which tries to open an app by custom url scheme, but it directly opens an app. Without opening an app, how to check if app is installed.
I want to find a way to run native mobile app, from a web app on a browser, and communicate the result back to it.
For example, how does Facebook user authentication work on a mobile device? You go to login with Facebook on a website. If on mobile, it opens the native Facebook app to do the authentication, and redirects the user back to the mobile web browser to open some page, post-authentication. Somehow, web browser and native application are able to communicate? Is there also any security risk to this?
One way to do this is as follows:
Use a custom url to launch the app from the website (see link below)
Pass whatever parameters you need to the app (for example a return web site URL in the case of a login authentication type app)
Once the app launches and does it thing, have the app launch a browser using the return address URL you passed as a parameter to the app.
A good, well maintained, link to using custom URL's and passing partakers to the App:
http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html