1.0.2 • Published 4 years ago

auth-with-apple v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

auth-with-apple

NPM module for easy use "sign in with apple" using the NodeJS server.

Install

$ npm i auth-with-apple

Usage

const appleAuth = require('auth-with-apple');

const key = fs.readFileSync("./AuthKey.p8").toString();
const swpParams = {
  authKey: key,
  team_id: 'team_id',
  key_identifier: 'key_identifier'
};

// Apple identity token you can get by your application
const appleData = appleAuth(apple_itentity_token, swpParams);

Response example

{ iss: 'https://appleid.apple.com',
  aud: 'com.application.app',
  exp: 1582100022,
  iat: 1582099422,
  sub: 'sub',
  c_hash: 'c_hash',
  email: 'useremail@somemail.com',
  email_verified: 'true',
  auth_time: 1582099422,
  nonce_supported: true }
1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago