npm i cordova-plugin-apple-login
Returns true if Sign in with Apple is available.
SignInWithApple.isAvailable().then(function (isAvailable) {
console.info(isAvailable)
})
Request authentication for Apple ID.
{
requestedScopes: [ SignInWithApple.Scope.Email ],
requestedOperation: SignInWithApple.Operation.Login,
user: 'userId',
state: 'state',
nonce: 'nonce'
}
{
authorizedScopes: [],
identityToken: 'identityToken',
authorizationCode: 'authorizationCode',
realUserStatus: 1,
fullName: {
namePrefix: null,
givenName: null,
nameSuffix: null,
middleName: null,
familyName: null,
nickname: null
},
email: null,
state: null,
user: 'userId'
}
see: https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidcredential
SignInWithApple.request({
requestedScopes: [ SignInWithApple.Scope.Email, SignInWithApple.Scope.FullName ],
}).then(function (credential) {
console.info(credential)
})
Returns the user credential status.
{
userId: 'userId'
}
SignInWithApple.getCredentialState({
userId: 'userId',
}).then(function (credentialState) {
console.info(credentialState)
})