cordova-plugin-sign-in-with-apple

A native-implemented plugin of Sign in with Apple // Thanks to your contribution! // Cordova>=8 iOS>=13

Showing:

Popularity

Downloads/wk

3K

GitHub Stars

63

Maintenance

Last Commit

1yr ago

Contributors

6

Package

Dependencies

0

Size (min+gzip)

0.2KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

cordova-plugin-sign-in-with-apple

see also: Official Documentation

This plugin only supports iOS >= 13.

Installation

Plugin installation

cordova plugin add cordova-plugin-sign-in-with-apple

or

cordova plugin add https://github.com/twogate/cordova-plugin-sign-in-with-apple.git

Usage

You should enable Sign in with Apple capability in Xcode. (project file -> Capabilities Tab -> Turn on "SignIn With Apple")

window.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))
  }
)

Options Example

  • requestedScopes is an array of requested scopes.
    • 0: FullName
    • 1: Email

Success Callback Data Example

Based on ASAuthorizationAppleIDCredential.

  • authorizationCode: string "<short-lived token used by your app for proof of authorization when interacting with the app’s server counterpart>"
  • email: string "address@example.com"
  • fullName: object, based on NSPersonNameComponents
  • identityToken: string "<JSON Web Token (JWT) that securely communicates information about the user to your app>"
  • state: string "<arbitrary string that your app provided to the request that generated the credential>"
  • user: string "<identifier associated with the authenticated user>"

Failure Callback Data Example

  • error: string "ASAUTHORIZATION_ERROR"
  • code: string 1001
  • localizedDescription: string "The operation couldn’t be completed. (com.apple.AuthenticationServices.AuthorizationError error 1001.)"
  • localizedFailureReason: string ""

Error Type

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial