[webview_flutter_android] Set support for web authentication#11681
[webview_flutter_android] Set support for web authentication#11681creatorpiyush wants to merge 16 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements Web Authentication support for the Android WebView, including the necessary Pigeon interface updates, native implementation, and example app integration. Feedback includes addressing a potential compatibility issue with Math.toIntExact on older Android APIs, renaming variables in documentation for clarity, and potentially using an enum to expose all support levels instead of a boolean toggle.
9a2593d to
886d8da
Compare
Thanks for the contribution! You’ve checked boxes in the PR checklist above that are not reflected in this PR, so I’m assuming this is a work in progress and am marking it as a Draft. Please review the checklist, updating the PR as appropriate, and when the state of the PR as posted reflects the checklist please feel free to mark it as ready for review. |
|
Hello @stuartmorgan-g, PR is up for review; that part was missed to be pushed. |
There was a problem hiding this comment.
Code Review
This pull request introduces support for configuring Web Authentication (WebAuthn) in the AndroidWebViewController via the setWebAuthenticationSupport method. The changes include updates to the Pigeon interface, Android native implementation using WebSettingsCompat, and the Dart API with a new WebAuthenticationSupport enum. A high-severity issue was identified regarding the use of Math.toIntExact, which requires API level 24 and would cause crashes on devices running Android 5.0 to 7.0 (API 21-23) supported by this plugin. Additionally, the WebAuthenticationSupportConstants class should use the @Deprecated annotation instead of just a doc comment for proper IDE and compiler support.
f7f9a80 to
a43bb7d
Compare
bparrishMines
left a comment
There was a problem hiding this comment.
Thanks for the contribution! Added a few comments.
47978d4 to
2fcb70a
Compare
…er_android_set-Web-Authentication-Support
d7ae571 to
cc4eb4a
Compare
…on-Support # Conflicts: # packages/webview_flutter/webview_flutter_android/CHANGELOG.md # packages/webview_flutter/webview_flutter_android/lib/src/android_webkit.g.dart # packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart # packages/webview_flutter/webview_flutter_android/test/android_webview_controller_test.dart
|
Hello @camsim99, Please review, rebase done |
|
Hello, Due to a setup change and wrong email config a commit was used with wrong email please accept the CLA check |
Updated minimum supported SDK version to Flutter 3.38/Dart 3.10.
We cannot accept a PR that has commits that don't correspond to a signed CLA email. If you are the author and the problem is a local configuration error, you need to fix your local configuration, amend the commit, and then re-push with the correct authorship information. |
This PR adds Android support for configuring WebView web authentication behavior through WebSettingsCompat.setWebAuthenticationSupport.
working-example.mp4
List which issues are fixed by this PR. You must list at least one issue.
flutter/flutter#186312
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2