Describe the bug
When using logto_dart_sdk in a Flutter web application, calling signIn() opens a login popup window. This works as expected on most platforms.
However, when running the app as a Progressive Web App (PWA) on iOS, clicking the login button fails to open the popup window. This is caused by Safari's platform restriction, which blocks popups that are not triggered synchronously by a direct user action.
Since signIn() is an async method, the popup is triggered after a delay (within a Future), and is therefore blocked by Safari. This makes login via Logto impossible in iOS PWA environments.
Expected behavior
When the user taps the "Sign in" button in a Flutter web app running as a PWA on iOS:
- A login popup window should open immediately.
- The user should be redirected to the Logto login page inside that popup.
- After successful authentication, the flow should continue as expected (redirect + token handling).
This entire flow currently fails because the popup is blocked at step 1.
How to reproduce?
- Create a minimal Flutter web app.
- Add logto_dart_sdk and follow the official documentation to configure login.
- Build the app for web.
- Install the app as a PWA on an iOS device (iPhone or iPad) using Safari.
- Tap the login button in the app.
Observed result:
No popup opens, or the popup is blocked. Login cannot proceed.
Environment
Self-hosted (Docker image)
Screenshots
No response
Describe the bug
When using logto_dart_sdk in a Flutter web application, calling signIn() opens a login popup window. This works as expected on most platforms.
However, when running the app as a Progressive Web App (PWA) on iOS, clicking the login button fails to open the popup window. This is caused by Safari's platform restriction, which blocks popups that are not triggered synchronously by a direct user action.
Since signIn() is an async method, the popup is triggered after a delay (within a Future), and is therefore blocked by Safari. This makes login via Logto impossible in iOS PWA environments.
Expected behavior
When the user taps the "Sign in" button in a Flutter web app running as a PWA on iOS:
This entire flow currently fails because the popup is blocked at step 1.
How to reproduce?
Observed result:
No popup opens, or the popup is blocked. Login cannot proceed.
Environment
Self-hosted (Docker image)
Screenshots
No response