iOS 11.3 breaks OAuth flow in PWA ( Add to home shortcut )

Hi Guys,


We are converting our web app into PWA, in that process we are facing the following issue.


We have OAuth implementation for sign-in into the app. This flow works perfectly in Safari browser on iPad iOS 11.3.


However, The issue is OAuth workflow being broken on iOS 11.3when using the PWA after doing the add to home screen.


Reproducing steps:

1)Open the web app in the Safari browser using app URL in IPad iOS 11.3

2)Add the app to the home screen using the 'add to home screen' option

3)Tapping on the shortcut icon would open the OAuth sign-in flow in Safari browser tab and get redirected back to the browser itself

instead of sandbox PWA app.


Could anyone let us know Is this a bug in PWA support of iOS 11.3?

We are stuck with this issue, Is there any workaround for this issue?


Looking for the prompt responses, any suggestions or feedbacks are highly appreciable.


Thank you,

Apoorva

Replies

>Could anyone let us know Is this a bug in PWA support of iOS 11.3?


File one via the bug report link below right and see what comes back...

I have the same issue using the firebase oauth flow (Faceboox or Google auth)...

So far I could not find a workaround without disabling the page redirect flow (impossible if using oauth).

No idea if it is possible to use an iframe for the auth - but I doubt it...

Apoorva,


I'm experiencing an issue which is very similar to yours. While looking into this I found this interesting article

https://medium.com/@firt/pwas-are-coming-to-ios-11-3-cupertino-we-have-a-problem-2ff49fd7d6ea which has a section "iOS reloads PWAs every time they get on screen" which might be related related to this behavior.


I'd like to know if any bugs have been filed regarding these issues and if so, what their status is.


Thanks!


Steven

This has been fixed after changes were made to the W3C spec. I can confirm oauth works in PWAs for iOS 12.2

Edit: iOS 12.2 is still in beta right now and is the first version to fix this issue

Still having this OAuth problem when using Safari "Add to Home" on my iPhone, iOS 13.5.1.

Is there a workaround or fix I can apply on my website?

Still having this OAuth problem

I’m going to recommend that you open a new thread about this, making sure to tag it with Safari. That’s more likely to attract the attention of folks who know about this stuff (this thread was migrated from the old DevForums and is not tagged correctly).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"

Did this ever get resolved? I'm currently having the exact same issue. I tried fixing it by triggering the OAuth flow in a popup window. This worked, but it's impossible to close the popup window and reload the parent window to continue the process. Any other ideas of how to do this?

Thanks!

I'm having the same issue in June 2023 - has anyone been able to find a solution? Come on, Apple - fix the issue, please!