flutter_web_auth icon indicating copy to clipboard operation
flutter_web_auth copied to clipboard

Chrome Custom Tab remains open in app switcher after the callback

Open maksymtrilenko opened this issue 4 years ago • 6 comments

The login flow works, but the Chrome Tab doesn't close itself after the app scheme callback. Adding the NO_HISTORY flag leads to the callback not working correctly: the app receives it, but the browser activity stays on top requiring the user to manually close it after which the flow finishes successfully.

maksymtrilenko avatar May 03 '21 03:05 maksymtrilenko

Multiple successful logins result in a large number of Chrome Custom Tabs in the app switcher.

maksymtrilenko avatar May 03 '21 03:05 maksymtrilenko

@maksymtrilenko Did you find a solution? I'm getting this issue too...

GioPan04 avatar May 24 '21 22:05 GioPan04

@GioPan04 check out this thread: https://stackoverflow.com/questions/42530178/auto-close-chrome-custom-tab

You'll have to play around with your Custom Tab intents in the native Android code part of the dependency. Certain combinations prevent the browser activity from closing hence breaking the callback after a successful authentication flow run.

maksymtrilenko avatar May 25 '21 08:05 maksymtrilenko

@maksymtrilenko Sorry for the late response. Btw, thanks to that flag I successfully closed the Chrome tab when the login succeed. Thank you!

GioPan04 avatar May 26 '21 23:05 GioPan04

@maksymtrilenko Sorry for the late response. Btw, thanks to that flag I successfully closed the Chrome tab when the login succeed. Thank you!

what is the flag? can't get it working...

pinguluk avatar Aug 26 '21 14:08 pinguluk

See #88

ThexXTURBOXx avatar Sep 07 '21 14:09 ThexXTURBOXx