@jasonpraful/apple-secret-generator
v1.0.3
Published
Apple Secret Generator - Used to generate Apple Secrets for Signin with Apple
Downloads
7
Maintainers
Readme
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
