Files
Regroup/lib/Utils/Common/AppleOAuthService.dart
2024-07-12 11:26:57 +05:30

23 lines
640 B
Dart

import 'package:get/get.dart';
import 'package:regroup/Utils/Common/googleOAuthService.dart';
import 'package:sign_in_with_apple/sign_in_with_apple.dart';
class AppleOAuthService {
void logIn() async {
try {
final credential = await SignInWithApple.getAppleIDCredential(
scopes: [
AppleIDAuthorizationScopes.email,
AppleIDAuthorizationScopes.fullName,
],
);
logger.d("email is ${credential.email}");
logger.d("fullname is ${credential.givenName}");
logger.d("token is ${credential.userIdentifier}");
} catch (e) {
print("Error occured");
}
}
}