signInWithApple method

Future<VerifyAppleTokenResponse> signInWithApple({
  1. Map<String, String>? context,
})

Authenticate with Apple Sign-In

Implementation

Future<VerifyAppleTokenResponse> signInWithApple({
  Map<String, String>? context,
}) async {
  final credential = await SignInWithApple.getAppleIDCredential(
    scopes: [
      AppleIDAuthorizationScopes.email,
      AppleIDAuthorizationScopes.fullName,
    ],
  );

  final identityToken = credential.identityToken;
  if (identityToken == null) {
    throw Exception('Failed to get Apple identity token');
  }

  return await verifyAppleToken(
    identityToken: identityToken,
    context: context,
  );
}