ThexXTURBOXx / flutter_web_auth_2

Flutter plugin for authenticating a user with a web service
https://pub.dev/packages/flutter_web_auth_2
MIT License
51 stars 50 forks source link

Slient Auth For Android and IOS #95

Closed varunlohade closed 8 months ago

varunlohade commented 8 months ago

Is your feature request related to a problem? Please describe.

I am working on an app where the user logs in with Google using flutter web auth 2, in some functionality I need to open the same logged-in website to get a redirect again, I have made it work but the package opens up the web view, is it possible to have a silent auth here, so that this happens in background

ThexXTURBOXx commented 8 months ago

I think this is unrelated to this package because the point of this package is to let the user authenticate using web services. If the user is already logged in and you want the authentication to happen in the background, your code should first check whether the user is already logged in and depending on that either let him authenticate using this package or do the authentication yourself in the background. There is no reliable way for this package to verify whether the user is in fact already logged in in any scenario. For example, even an error 403 can mean either "You are logged out and hence cannot access page X" or "You are logged in, but still don't have permission to access page X". Hence, I will close this as not planned and unrelated to this package. Also, as an example, my app StudiPassau does pretty much exactly what you need. It checks via OAuth 1.0a whether the user is authenticated or not and depending on that either uses this package or not.

varunlohade commented 7 months ago

Thanks This helps