casdoor / casdoor-flutter-sdk

Flutter SDK for Casdoor, see example at: https://github.com/casdoor/casdoor-flutter-example
https://github.com/casdoor/casdoor
Apache License 2.0
12 stars 13 forks source link

Rationale for using native implementation of WebView #29

Closed fischermario closed 11 months ago

fischermario commented 1 year ago

Why did you choose to implement the WebView in native code on Android and iOS?

From my perspective there is no real advantage there. It would be better to use the flutter_inappwebview package which supports Android, iOS, macOS and the web. Windows and Linux support could be added using the desktop_webview_window package.

IMHO the main disadvantage of the current solution is the usage of the system's default browser. There you have no control over cookies (that is especially bad when you want to log out from 3rd party provider using the SDK) and you have no fullscreen mode. Even worse on iOS you have to confirm that you really want to open the Casdoor website on the first attempt.

If this appears useful to you I want to offer my help in migrating the SDK to use the packages mentioned above.

casbin-bot commented 1 year ago

@seriouszyx @ComradeProgrammer @Resulte

hsluoyz commented 1 year ago

@fischermario sounds good. Can you make a PR?

fischermario commented 1 year ago

@hsluoyz Great! I can get started on it right away. Might take a few days as this is a spare-time thing for me. I will open a PR somewhere next week. Please keep this issue open until then.