Is there any plugin to implement “Sign in with Apple”? Apple not verify my app and I have not found information how to implement it. I use angularx-social-login and an API REST for Google and Facebook login but it is not for Apple login…
You can use firebase if it’s for a webapp…
I try lot finally it’s works for me.
declare var cordova: any; //Add this line right below the imports
///
SignInApple(){
return new Promise((resolve, reject) => {
cordova.plugins.SignInWithApple.signin({
requestedScopes: [0, 1]
}, (succ) => {
// If you want to use firebase then use below
var provider = new firebase.auth.OAuthProvider('apple.com').credential(succ.identityToken);
this.afAuth.auth.signinWithCredential(provider).then(result => {
}).catch( error => {
reject( error.message || error );
})
// If you want your own auth validation method you can add it here.
},(err) => { // changed here too, for consistence
reject("Apple login failed");
})
})
}