feat(mobile): Implement Keycloak WebView authentication with HTTP callback
- Replace flutter_appauth with custom WebView implementation to resolve deep link issues - Add KeycloakWebViewAuthService with integrated WebView for seamless authentication - Configure Android manifest for HTTP cleartext traffic support - Add network security config for development environment (192.168.1.11) - Update Keycloak client to use HTTP callback endpoint (http://192.168.1.11:8080/auth/callback) - Remove obsolete keycloak_auth_service.dart and temporary scripts - Clean up dependencies and regenerate injection configuration - Tested successfully on multiple Android devices (Xiaomi 2201116TG, SM A725F) BREAKING CHANGE: Authentication flow now uses WebView instead of external browser - Users will see Keycloak login page within the app instead of browser redirect - Resolves ERR_CLEARTEXT_NOT_PERMITTED and deep link state management issues - Maintains full OIDC compliance with PKCE flow and secure token storage Technical improvements: - WebView with custom navigation delegate for callback handling - Automatic token extraction and user info parsing from JWT - Proper error handling and user feedback - Consistent authentication state management across app lifecycle
This commit is contained in:
@@ -24,6 +24,8 @@ dependencies:
|
||||
jwt_decoder: ^2.0.1
|
||||
crypto: ^3.0.5
|
||||
shared_preferences: ^2.3.2
|
||||
flutter_appauth: ^6.0.2
|
||||
webview_flutter: ^4.4.2
|
||||
|
||||
# HTTP
|
||||
pretty_dio_logger: ^1.4.0
|
||||
@@ -43,7 +45,17 @@ dependencies:
|
||||
# Utils
|
||||
uuid: ^4.5.1
|
||||
url_launcher: ^6.3.1
|
||||
permission_handler: ^11.3.1
|
||||
package_info_plus: ^8.0.2
|
||||
flutter_staggered_animations: ^1.1.1
|
||||
|
||||
# Export/Import
|
||||
excel: ^4.0.6
|
||||
csv: ^6.0.0
|
||||
pdf: ^3.11.1
|
||||
path_provider: ^2.1.4
|
||||
file_picker: ^8.1.2
|
||||
share_plus: ^10.0.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
Reference in New Issue
Block a user