in iOS when auth browser window is open and we switch to other app and switch back, browser remains active and we can continue authenticating.
In Android when we switch to another app and back, browser window is disappeared, and 'user canceled login' error is received.
No any flags are used when calling authenticate.
I think this is not intended behavior, because
1) iOS and Android behavior is different
2) In Android user can't switch app to copy/paste credentials, which is bad user experience, so we receive bad reviews
I tried to google this bug and seems it is very common in other auth and 3ds libraries, and is related to Chrome Custom Tabs, but it is unclear how to avoid closing tab when switching apps.
Minimal Reproduction
Steps to reproduce the behaviour:
Use the following code:
final result = await FlutterWebAuth2.authenticate(
url: url,
callbackUrlScheme: url-scheme,
);
Exception or Error
User canceled login event after switching app
Expected Behaviour
Browser window remains on top after switching app
Screenshots
No response
Additional context
No response
Device
Android simulator, Google Pixel. Xiaomi, etc
OS
iOS 15.5
Browser
none
Flutter version
3.3.10
flutter_web_auth_2 version
3.1.1
Checklist
[X] I have read and followed the entiretroubleshooting guide and it has not provided the solution I need.
Description
in iOS when auth browser window is open and we switch to other app and switch back, browser remains active and we can continue authenticating. In Android when we switch to another app and back, browser window is disappeared, and 'user canceled login' error is received. No any flags are used when calling authenticate. I think this is not intended behavior, because 1) iOS and Android behavior is different 2) In Android user can't switch app to copy/paste credentials, which is bad user experience, so we receive bad reviews
I tried to google this bug and seems it is very common in other auth and 3ds libraries, and is related to Chrome Custom Tabs, but it is unclear how to avoid closing tab when switching apps.
Minimal Reproduction
Steps to reproduce the behaviour:
Exception or Error
User canceled login event after switching app
Expected Behaviour
Browser window remains on top after switching app
Screenshots
No response
Additional context
No response
Device
Android simulator, Google Pixel. Xiaomi, etc
OS
iOS 15.5
Browser
none
Flutter version
3.3.10
flutter_web_auth_2 version
3.1.1
Checklist