Open JPFrancoia opened 9 months ago
Yes, the current flow seems like it is highly dependent on the browser being used. Some browsers allow this behaviour (which some developers even call a "bug" because it could be insecure), while some others block it. I will need to see what could be done or someone could provide a PR with a better system, if possible.
I have the same warning on Desktop Firefox, and auth.html
doesn't close automatically.
Scripts may not close windows that were not opened by script.
Description
I used to have my auth flow fully working, but after a big refactor it started not for web browsers on mobiles, and web browsers for mobiles only. It works with:
But it does NOT work on Android, in a browser (I tried Chrome and Firefox). I used debugging via USB and I got this error message:
This is really weird to me, as I expected the web version to work the same on phones and desktop computer.
In the browser on mobile, when I trigger my auth flow, everything seems to go well:
Minimal Reproduction
The dart code for the authentication:
auth.html:
I tried flutter_web_auth_2 version 2^ and 3^, same result.
Exception or Error
Scripts may not close windows that were not opened by script. [auth.html:17:13]
Expected Behaviour
I would expect the tab opened during the auth flow to close, and I would expect my app to finish the auth flow
Screenshots
No response
Additional context
No response
Device
Xiaomi REDMI Note 10 Pro
OS
Android 13
Browser
Chrome, Firefox
Flutter version
3.16.3
flutter_web_auth_2 version
3^
Checklist