Sign in with Apple ID => Ionic Support?

I have several Ionic 3 apps that I’m starting to get worried about. As you know, Apple is saying April 2020 will be the deadline to support “Sign in with Apple ID”. Is there a solution in-place?

I can’t seem to find much documentation on it. Thank you in advance.

2 Likes

I have the same concern, please help.

Yes there is… firebase has this. https://firebase.googleblog.com/2019/11/sign-in-with-apple-auth.html

1 Like

You can use this plugin:
https://www.npmjs.com/package/cordova-plugin-sign-in-with-apple

Usage:
declare var cordova: any;

cordova.plugins.SignInWithApple.signin(
null,
(appleLoginResponse: any) => {
console.log( appleLoginResponse )
this.signInFirebaseApple( appleLoginResponse )
},
(err: any) => {
console.error(err)
console.log(JSON.stringify(err))
}
)

Thanks Jay0, I’ll try it out.

Is this plugin working?

I have my app rejected by Apple because it has Google and Facebook logins and does not have Apple login. Tried this plugin but I am stuck with an error highlighting SignInWithApple on the function cordova.plugins.SignInWithApple.signin( ) saying “Property ‘SignInWithApple’ does not exist on type ‘CordovaPlugins’” I have declared cordova: any on the top of the page. Please assist. :frowning:

There is a similar topic created 9 hours before yours:

And there is an answer with the following plugin:

It seems most of us need some free and really working solution

Managed to get my Apple login to work. Here is what I have to do;

Added this line under the declarations;
import { GooglePlus } from ‘@ionic-native/google-plus’;

import { Facebook } from ‘@ionic-native/facebook’;

declare var cordova: any; //Add this line right below the imports

Then here is the function

doAppleLogin() {
cordova.plugins.SignInWithApple.signin(
{ requestedScopes: [0, 1] },
function(succ){
console.log(succ)
alert(JSON.stringify(succ))
},
function(err){
console.error(err)
console.log(JSON.stringify(err))
}
)
}

Please note: Test on simulator or ios device.

Thanks

Dave

1 Like

Glad to help. :smiley:

Has anyone had success with passing the result to Firebase for authentication?
The only method they currently offer is a popup or native with a nonce passed to the credential as far as I can tell…

Any guidance would be appreciated.

1 Like

you can use the coding here: