This commit is contained in:
Hamza-Ayed
2025-02-07 23:55:10 +03:00
parent bacf22204d
commit 218e174c87
19 changed files with 95 additions and 15 deletions

View File

@@ -7,30 +7,24 @@ class AuthController extends GetxController {
Future<User?> signInWithApple() async {
try {
print('Starting Apple Sign In process');
final appleCredential = await SignInWithApple.getAppleIDCredential(
scopes: [
AppleIDAuthorizationScopes.email,
AppleIDAuthorizationScopes.fullName,
],
);
print('Apple ID Credential obtained');
final oAuthProvider = OAuthProvider('apple.com');
final credential = oAuthProvider.credential(
idToken: appleCredential.identityToken,
accessToken: appleCredential.authorizationCode,
);
print('OAuth credential created');
UserCredential userCredential =
await _auth.signInWithCredential(credential);
print('User signed in successfully: ${userCredential.user?.uid}');
return userCredential.user;
} catch (error) {
print('Error during Apple Sign In: $error');
return null;
}
}
@@ -38,9 +32,6 @@ class AuthController extends GetxController {
Future<void> signOut() async {
try {
await _auth.signOut();
print('User signed out successfully');
} catch (error) {
print('Error during sign out: $error');
}
} catch (error) {}
}
}

View File

@@ -166,7 +166,6 @@ class GoogleSignInHelper {
static Future<void> _handleSignUp(GoogleSignInAccount user) async {
// Store driver information
Log.print('email is ${user.email}');
box.write(BoxName.passengerID, user.id);
box.write(BoxName.email, encryptionHelper.encryptData(user.email));
box.write(BoxName.name,

View File

@@ -126,7 +126,7 @@ void main() async {
ShortcutItem(
type: 'share_app',
localizedTitle: 'Share App'.tr,
icon: 'icon_main',
icon: 'icon_share',
),
ShortcutItem(
type: 'wallet',