tomgilder / flutter_apple_sign_in

Flutter Plugin for Sign In with Apple
MIT License
160 stars 70 forks source link

Apple sign in retruns null #66

Closed muhammednazil closed 3 years ago

muhammednazil commented 3 years ago

_appleLogin() async { if (await AppleSignIn.isAvailable()) { final AuthorizationResult result = await AppleSignIn.performRequests([ AppleIdRequest(requestedScopes: [Scope.email, Scope.fullName])

  ]);
  if (result.status == AuthorizationStatus.authorized){
    print(result.credential.fullName.givenName);//All the required credentials
    print(result.credential.fullName.familyName);//All the required credentials
    print(result.credential.fullName.nickname);//All the required credentials
    print(result.credential.user);//All the required credentials

    print("Sign in email: ${result.credential.email}");

    // push(VerifyUserScreenFromSocial(name:(result.credential.fullName).toString(),email:(result.credential.email).toString(),socialId:(result.credential.identityToken).toString()));
    final body = json.decode(result.toString());
    print(body.toString());

  }else if (result.status == AuthorizationStatus.error){
    print("Sign in failed: ${result.error.localizedDescription}");
  }else{
    print('User cancelled');
  }
}else{
  print('Apple SignIn is not available for your device');
}
}
easazade commented 3 years ago

i have the same problem how did you solve this?

taracell commented 3 years ago

Please use the fork of this that is currently maintained https://pub.dev/packages/the_apple_sign_in