FYI SQRL and PWAs on iOS


Oct 30, 2020
7
2
Hi Jeff,

I notice that the new testflight SQRL has the awesome feature of punting you back to safari after logging in. However I just found a use case where this breaks. If the site you are logging in to is a progressive web app (like a home screen bookmarklet), then your app authenticates a new session in safari rather than in the PWA's sandboxed safari.

Not sure if this is worth fixing because PWAs aren't first class citizens on iOS like they are on Android, but if that ever changes and we see a lot more PWAs on iOS, it might make sense to address this.
 

Jeffa

Well-known member
May 20, 2018
222
115
Hi Jeff,

I notice that the new testflight SQRL has the awesome feature of punting you back to safari after logging in. However I just found a use case where this breaks. If the site you are logging in to is a progressive web app (like a home screen bookmarklet), then your app authenticates a new session in safari rather than in the PWA's sandboxed safari.

Not sure if this is worth fixing because PWAs aren't first class citizens on iOS like they are on Android, but if that ever changes and we see a lot more PWAs on iOS, it might make sense to address this.
Hi Harrison,

Firstly Thanks for testing and thanks for noticing.

It actually does a little more than punting you back to Safari. It tries its best to identify what browser made the CPS query and then tries to redirect to the actual tab that called it in that very browser. If falls back to Safari if it can’t work out which browser called it.

This is working with Safari,Chrome and Firefox now but can be extended to work with any browser that I can identify from it query and that has a url scheme to allow me to call it back.

As for Home Screen bookmarklets it did used to work too, but suspect that it has fallen foul or recent changes in the area.

So I suppose if a specific PWA can he identified uniquely and has a URL scheme I could extend to support it.