LinusU / flutter_web_auth

Flutter plugin for authenticating a user with a web service
MIT License
197 stars 169 forks source link

Android auth web session terminates when opening other apps #158

Open AdamAH opened 1 year ago

AdamAH commented 1 year ago

Hi there,

We're facing a weird Android only issue where when the webview opens up to initiate the auth session, the user gets sent an OTP, so they open their email app like Gmail, and when they return back to our app the webview is closed. We noticed that when you tap on the "App Selector" on android to see all active apps, the webview (chrome custom tab) shuts down, and doesnt persist.

How do we stop that from happening as users need to access their emails to get the OTP, then return to our app to input it?

Thanks!

adminant commented 8 months ago

Same problem, do you have an idea to fix it? I tried to rewrite custom tabs code in plugin, and managed to run browser that is not closed when switching apps, but it persists as a separate app in app selector, and user can return to main app, which leads to auth error.

ScottAtRedHawk commented 6 months ago

I'm seeing this issue as well when users have to leave the authenticating app to approve a DuoMobile MFA request. Any fixes yet?

ruan65 commented 1 month ago

I am also interested in solving the problem, while I switch to check the code in the email, the auth window closed after returning to the app