Sign in with Apple for Node.js
An easy-to-use Node.js library for Signing in with Apple!
Setup
Begin by installing the library:
npm install apple-sign-in-ts
Usage
Initialize it using the following code:
import * as fs from "fs"
import AppleSignIn from "apple-sign-in-ts"
const config = fs.readFileSync("./config/config");
const auth = new AppleSignIn(config, './config/AuthKey.p8');
Methods:
-
auth.accessToken(grantCode)
- Gets the access token from the grant code received -
auth.refreshToken(refreshToken)
- Gets the access token from a refresh token
⚠️ Disclaimer
This repository is NOT developed, endorsed by Apple Inc. or even related at all to Apple Inc. The library is a helper library for anyone trying to implement Apple's Sign in with Apple.