LinusU / flutter_web_auth

Flutter plugin for authenticating a user with a web service
MIT License
198 stars 173 forks source link

Chrome Custom Tab remains open in app switcher after the callback #72

Open maksymtrilenko opened 3 years ago

maksymtrilenko commented 3 years ago

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 commented 3 years ago

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

GioPan04 commented 3 years ago

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

maksymtrilenko commented 3 years ago

@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.

GioPan04 commented 3 years ago

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

pinguluk commented 3 years ago

@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...

ThexXTURBOXx commented 3 years ago

See #88