HACKER Q&A
📣 uLogMicheal

MagicLink Logins Impossible for iOS PWA?


There does not seem to be a way to open a link in a iOS PWA. You cannot paste it into the instance, you cannot "open with", and safari does not keep the proper auth cookie when upgrading an app from the browser to a PWA instance. I went to great lengths to implement robust reminders for my flutter PWA and follow the rules to ensure it would theoretically work with iOS devices. Now after grabbing an iOS device to test, I see that users cannot even login via the PWA!

The Apple dislike for PWAs is real. Any work arounds for magic links on iOS PWAs?

Current PWA UX for Magic Link on Apple devices --

* Send link to device.

* User clicks to open, clicks to confirm.

* Login saved to temporary session in webview, must login again.

* User sends link to device.

* Login from browser, tap to add to home screen.

* Cookie doesn't exist in PWA instance, user must login again.

* User sends link to device.

* User copies, goes to PWA Instance.

* ???

Time to add new auth methods specifically because Apple?


  👤 gkbrk Accepted Answer ✓
It is good practice to isolate any email/chat links from regular browser cookies, and similarly it is good practice to isolate PWA cookies from browser cookies.

It's not expected that the browser to dig up auth tokens from the Instagram app whenever Instagram resources are accessed from the browser. When people click "Add add to home screen", they expect this "app" to have similar sandboxing compared to their other apps.

> Time to add new auth methods specifically because Apple?

You don't need to add new auth methods specifically because of Apple. You need to add an auth method because you decided to something fancy that users and email clients/browsers don't expect.

If you use a username/password combo or an email/password combo, it works everywhere.