How to enable "Sign in with Apple Id" in Ionic 3 application

This plugin seems to work: cordova-plugin-apple-login

This plugin opens the iOS Apple sigin in. After the user has been authenticated, you get a response containing an userID and authorizationCode. You can send the authorizationCode to your backend and verify the user.

Since there is no ionic-native-wrapper for this plugin, you will need to add the following to use the plugin:

declare var SignInWithApple: any;

You could use this Ionic wrapper :

Install the plugin and the wrapper :

ionic cordova plugin add cordova-plugin-sign-in-with-apple
npm i --save @ionic-native/sign-in-with-apple

Import :

import { SignInWithApple, AppleSignInResponse, AppleSignInErrorResponse, ASAuthorizationAppleIDRequest } from '@ionic-native/sign-in-with-apple';

An example of use (with firebase) :

  async loginWithApple(): Promise<void> {
    if ('cordova')) {
      try {
        const appleCredential: AppleSignInResponse = await SignInWithApple.signin({
          requestedScopes: [
        const credential = new firebase.auth.OAuthProvider('').credential(
          .then((res) => {
            console.log('Login successful', res);
          .catch((error) => {
      } catch (error) {