25-2/7/3
This commit is contained in:
@@ -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) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -126,7 +126,7 @@ void main() async {
|
||||
ShortcutItem(
|
||||
type: 'share_app',
|
||||
localizedTitle: 'Share App'.tr,
|
||||
icon: 'icon_main',
|
||||
icon: 'icon_share',
|
||||
),
|
||||
ShortcutItem(
|
||||
type: 'wallet',
|
||||
|
||||
Reference in New Issue
Block a user