signInWithProvider method
Implementation
Future<User> signInWithProvider() async {
AppleAuthProvider appleProvider = AppleAuthProvider();
appleProvider.addScope('email');
appleProvider.addScope('name');
final credential =
await FirebaseAuth.instance.signInWithProvider(appleProvider);
if (credential.user != null) return credential.user!;
throw Exception('credential.currentUser is null');
}