0.2.0 • Published 3 years ago

@unagidev/apple-sign-in v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Capacitor Sign in With Apple

All Contributors

All Contributors

Capacitor plugin to support Sign in With Apple

Maintainers

MaintainerGitHubSocialSponsoring Company
Max Lynchmlynch@maxlynchIonic
Jose "Pilito" Martinezepicshaggy@pilito_he
Laszlo Csokalcsoka

Maintenance Status: Partially Maintained (help wanted)

Installation

  • npm i @capacitor-community/apple-sign-in

Usage (iOS, Web)

import {
  SignInWithApple,
  SignInWithAppleResponse,
  SignInWithAppleOptions,
} from "@capacitor-community/apple-sign-in";

let options: SignInWithAppleOptions = {
  clientId: "com.your.webservice",
  redirectURI: "https://www.yourfrontend.com/login",
  scopes: "email name",
  state: "12345",
  nonce: "nonce",
};

SignInWithApple.authorize(options)
  .then((result: SignInWithAppleResponse) => {
    // Handle user information
    // Validate token with server and create new session
  })
  .catch((error) => {
    // Handle error
  });

Instructions (Android)

Not supported.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!