1.0.3 • Published 11 months ago
@jasonpraful/apple-secret-generator v1.0.3
Secret Generator for Sign-In with Apple
Quickstart
As an executable:
npx @jasonpraful/apple-secret-generator --helpAs a library:
import { generateSecret } from '@jasonpraful/apple-secret-generator'
const secret = generateAppleSecret(key, days, kid, team, client)
console.log(secret) // JWT TokenUsage
| Option | Description | Required | Default | Example |
|---|---|---|---|---|
| -i, --key-id | The identifier of the key to use - derived from here | Yes | N/A | FTXXXXX |
| -k, --key | The path to the key file - downloaded from here | Yes | key.p8 | ./key.p8 |
| -c, --client | The client ID of the service - derived by creating a service ID here. Important: This is not the same as the bundle ID. | Yes | N/A | com.example.service |
| -t, --team | The identifier of the team to use - derived from here | Yes | N/A | XXXXXXXX |
| -d, --days | The number of days the secret should be valid for. Please note: The maximum value allowed by apple is 180days. | No | 180 | 90 |
License
MIT