3

I have a web app that handles user login using LinkedIn's OAuth API. The page redirects to LinkedIn's domain, then back to mine once the user has been authenticated. When my app is run after being added to the home screen on iOS via Safari, the LinkedIn authentication page opens in Safari, not in the home screen app.

I take it this is because linkedin.com is outside the scope property in my app's web manifest?

Does anyone have a solution to keep an entire cross-domain login flow like this within the home screen app? I'm also trying to figure out if this behavior is within the spirit of the spec (or if such behavior is undefined).

It looks like there is precedence for cross-domain redirects being contained within the home screen app in Chrome on Android:

https://bugs.chromium.org/p/chromium/issues/detail?id=771418
Standalone PWA breaks login

You can see the behavior by trying the LinkedIn login at fizzr.io after adding the landing page to the home screen on iOS. Just tapping the LinkedIn button will open the login flow externally in Safari.

Here's my app manifest:

{
    "name": "fizzr.io",
    "short_name": "fizzr.io",
    "icons": [
        {
            "src": "app-icon-192.png",
            "sizes": "192x192",
            "type": "image/png"
        },
        {
            "src": "app-icon-512.png",
            "sizes": "512x512",
            "type": "image/png"
        }
    ],
    "theme_color": "#ffffff",
    "background_color": "#ffffff",
    "display": "standalone",
    "start_url": "/",
    "scope": "/"
}
Peter Fernandes
  • 307
  • 1
  • 9
  • Did you figure this one out yet? Been stuck on this for a little while now, works perfectly on Android, but in standalone apple mobile devices the redirect opens in Safari not the PWA... can't figure it out... any ideas? – Wonka Jul 31 '18 at 15:12
  • No solutions yet. I really think this is a problem with WebKit but it's really tough getting any communication from the team on issues. – Peter Fernandes Jul 31 '18 at 21:27
  • It looks like you removed the manifest meta tag, but the PWA has url bars included, so it's not standalone like a true native app feels. If you put a PWA example link in the question with the meta tag for the manifest with display: standalone, I will add a bounty to this question and hopefully we'll find a solution. – Wonka Jul 31 '18 at 22:34

1 Answers1

0

I believe this is now fixed as of Safari on iOS 12.2 Beta 1: https://twitter.com/tomayac/status/1089819735292866560

Peter Fernandes
  • 307
  • 1
  • 9