feat: Implement Apple Sign-In for Android by adding a callback function, updating redirect URI, and configuring the Android manifest.
This commit is contained in:
@@ -58,6 +58,9 @@ class _LoadingContentState extends State<LoadingContent>
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint('Erreur lors de la tâche en arrière-plan: $e');
|
||||
if (mounted) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,20 +225,20 @@ class AuthService {
|
||||
}
|
||||
|
||||
// Request Apple ID credential with platform-specific configuration
|
||||
final AuthorizationCredentialAppleID credential =
|
||||
await SignInWithApple.getAppleIDCredential(
|
||||
scopes: [
|
||||
AppleIDAuthorizationScopes.email,
|
||||
AppleIDAuthorizationScopes.fullName,
|
||||
],
|
||||
// Configuration for Android/Web
|
||||
webAuthenticationOptions: WebAuthenticationOptions(
|
||||
clientId: 'be.devdayronvl.travel_mate.service',
|
||||
redirectUri: Uri.parse(
|
||||
'https://travelmate-a47f5.firebaseapp.com/__/auth/handler',
|
||||
),
|
||||
),
|
||||
);
|
||||
final AuthorizationCredentialAppleID
|
||||
credential = await SignInWithApple.getAppleIDCredential(
|
||||
scopes: [
|
||||
AppleIDAuthorizationScopes.email,
|
||||
AppleIDAuthorizationScopes.fullName,
|
||||
],
|
||||
// Configuration for Android/Web
|
||||
webAuthenticationOptions: WebAuthenticationOptions(
|
||||
clientId: 'be.devdayronvl.TravelMate.service',
|
||||
redirectUri: Uri.parse(
|
||||
'https://us-central1-travelmate-a47f5.cloudfunctions.net/callbacks_signInWithApple',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Create OAuth credential for Firebase
|
||||
final OAuthCredential oauthCredential = OAuthProvider("apple.com")
|
||||
|
||||
Reference in New Issue
Block a user