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:
@@ -74,7 +74,7 @@ class _StatsOverviewCardState extends State<StatsOverviewCard>
|
||||
|
||||
Widget _buildCard() {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(DesignSystem.spacingLg),
|
||||
padding: const EdgeInsets.all(DesignSystem.spacingLg),
|
||||
decoration: BoxDecoration(
|
||||
gradient: DesignSystem.primaryGradient,
|
||||
borderRadius: BorderRadius.circular(DesignSystem.radiusLg),
|
||||
@@ -84,11 +84,11 @@ class _StatsOverviewCardState extends State<StatsOverviewCard>
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildHeader(),
|
||||
SizedBox(height: DesignSystem.spacingLg),
|
||||
const SizedBox(height: DesignSystem.spacingLg),
|
||||
_buildMainStats(),
|
||||
SizedBox(height: DesignSystem.spacingLg),
|
||||
const SizedBox(height: DesignSystem.spacingLg),
|
||||
_buildSecondaryStats(),
|
||||
SizedBox(height: DesignSystem.spacingMd),
|
||||
const SizedBox(height: DesignSystem.spacingMd),
|
||||
_buildProgressIndicator(),
|
||||
],
|
||||
),
|
||||
@@ -109,7 +109,7 @@ class _StatsOverviewCardState extends State<StatsOverviewCard>
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
SizedBox(height: DesignSystem.spacingXs),
|
||||
const SizedBox(height: DesignSystem.spacingXs),
|
||||
Text(
|
||||
'Statistiques générales',
|
||||
style: DesignSystem.bodyMedium.copyWith(
|
||||
@@ -119,7 +119,7 @@ class _StatsOverviewCardState extends State<StatsOverviewCard>
|
||||
],
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(DesignSystem.spacingSm),
|
||||
padding: const EdgeInsets.all(DesignSystem.spacingSm),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(DesignSystem.radiusMd),
|
||||
@@ -145,7 +145,7 @@ class _StatsOverviewCardState extends State<StatsOverviewCard>
|
||||
Colors.white,
|
||||
),
|
||||
),
|
||||
SizedBox(width: DesignSystem.spacingLg),
|
||||
const SizedBox(width: DesignSystem.spacingLg),
|
||||
Expanded(
|
||||
child: _buildStatItem(
|
||||
'Membres Actifs',
|
||||
@@ -170,7 +170,7 @@ class _StatsOverviewCardState extends State<StatsOverviewCard>
|
||||
isSecondary: true,
|
||||
),
|
||||
),
|
||||
SizedBox(width: DesignSystem.spacingLg),
|
||||
const SizedBox(width: DesignSystem.spacingLg),
|
||||
Expanded(
|
||||
child: _buildStatItem(
|
||||
'Taux d\'activité',
|
||||
@@ -201,7 +201,7 @@ class _StatsOverviewCardState extends State<StatsOverviewCard>
|
||||
color: color,
|
||||
size: isSecondary ? 16 : 20,
|
||||
),
|
||||
SizedBox(width: DesignSystem.spacingXs),
|
||||
const SizedBox(width: DesignSystem.spacingXs),
|
||||
Text(
|
||||
label,
|
||||
style: (isSecondary ? DesignSystem.labelMedium : DesignSystem.labelLarge).copyWith(
|
||||
@@ -211,7 +211,7 @@ class _StatsOverviewCardState extends State<StatsOverviewCard>
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: DesignSystem.spacingXs),
|
||||
const SizedBox(height: DesignSystem.spacingXs),
|
||||
Text(
|
||||
value,
|
||||
style: (isSecondary ? DesignSystem.headlineMedium : DesignSystem.displayMedium).copyWith(
|
||||
@@ -250,7 +250,7 @@ class _StatsOverviewCardState extends State<StatsOverviewCard>
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: DesignSystem.spacingXs),
|
||||
const SizedBox(height: DesignSystem.spacingXs),
|
||||
Container(
|
||||
height: 6,
|
||||
decoration: BoxDecoration(
|
||||
|
||||
Reference in New Issue
Block a user