Skip to content
No description, website, or topics provided.
Objective-C JavaScript
Branch: master
Clone or download

Latest commit

Latest commit 57bd9b9 Sep 26, 2019

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/ios first commit Sep 26, 2019
www first commit Sep 26, 2019
.gitignore
LICENSE first commit Sep 26, 2019
README.md
package-lock.json
package.json first commit Sep 26, 2019
plugin.xml first commit Sep 26, 2019

README.md

cordova-plugin-apple-login

Install

npm i cordova-plugin-apple-login

Usage

SignInWithApple.isAvailable()

Returns true if Sign in with Apple is available.

Sample:

SignInWithApple.isAvailable().then(function (isAvailable) {
  console.info(isAvailable)
})

SignInWithApple.request(options)

Request authentication for Apple ID.

Options:

{
  requestedScopes: [ SignInWithApple.Scope.Email ],
  requestedOperation: SignInWithApple.Operation.Login,
  user: 'userId',
  state: 'state',
  nonce: 'nonce'
}

Returns:

{
  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

Sample:

SignInWithApple.request({
  requestedScopes: [ SignInWithApple.Scope.Email, SignInWithApple.Scope.FullName ],  
}).then(function (credential) {
  console.info(credential)
})

SignInWithApple.getCredentialState(options)

Returns the user credential status.

Options:

{
  userId: 'userId'
}

Returns:

see: https://developer.apple.com/documentation/authenticationservices/asauthorizationappleidprovider/credentialstate

Sample:

SignInWithApple.getCredentialState({
  userId: 'userId',  
}).then(function (credentialState) {
  console.info(credentialState)
})
You can’t perform that action at this time.