Skip to content
This repository has been archived by the owner on Feb 14, 2025. It is now read-only.

Client Secret generator for # With Apple. Client Secret is used for generating access tokens against an auth token.

License

Notifications You must be signed in to change notification settings

praveentcom/siwa-client-secret

Repository files navigation

Apple ID Client Secret

The Apple ID REST API for exchanging authorization codes or refresh tokens for access tokens requires a client secret in the form of a signed JWT. This simple library will generate the signed JWT using minimal configuration.

Implementation based on Generate and Validate Tokens documentation from Apple and built using the jsonwebtoken package from Auth0.

Install

$ npm install @praveentcom/siwa-client-secret

or

$ yarn add @praveentcom/siwa-client-secret

Usage

import { createClientSecret } from "@praveentcom/siwa-client-secret"

const clientSecret: string = createClientSecret({
  keyId: "{key ID from Apple}",
  bundleId: "com.example",
  teamId: "{team ID frmo Apple}",
  privateKey: `-----BEGIN PRIVATE KEY-----
    {your}
    {private}
    {key}
    -----END PRIVATE KEY-----`;
});

License

This project is licensed under the MIT license. See the LICENSE file for more info.

Attibutions

This project was originally forked from @maxschmeling's [repository] (https://github.com/maxschmeling/apple-id-client-secret) since the repository was not maintained to fix vulnerabilities and recent # with Apple enhancements.

About

Client Secret generator for # With Apple. Client Secret is used for generating access tokens against an auth token.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •