⛔ DEPRECATED |
---|
This repository has been deprecated, the generator is now integrated into the TypeScript SDK repository. |
The generator for the Kinde TypeScript SDK.
This generator creates an SDK in TypeScript that can authenticate to Kinde using the Authorization Code grant or the Authorization Code with PKCE grant via the OAuth 2.0 protocol. It can also access the Kinde Management API using the client credentials grant.
Also, see the SDKs section in Kinde’s contributing guidelines.
You will need the following tools to be able to generate the SDK.
The openapi-generator-cli
dependency of this generator is made use of as a docker image. You can find the instructions for installing docker engine here. Once installed the required image can be installed with the following command.
docker pull openapitools/openapi-generator-cli
This command-line program is required since the generating script generate.sh
(see below), performs a GET
request to fetch the kinde-mgmt-api-specs.yaml
open-api spec file for Kinde. This program is most likely available via your operating systems package manager (some examples are provided below). If not then see this link.
On linux distributions like Ubuntu and Debian.
apt install curl
On MacOS you can install curl
using Homebrew.
brew install curl
-
Clone the repository to your machine:
git clone https://github.com/kinde-oss/kinde-typescript-generator.git
-
Go into the project:
cd kinde-typescript-generator
-
Install the OpenAPI Generator tool:
Run the following command to generate the SDK:
./generate.sh kinde-business-name
Please be mindful that kinde-business-name
is an optional argument which replaces the {businessName} variable in the kinde-mgmt-api-specs.yaml
specification file, if provided.
Note: The API specifications should always point to Kinde's hosted version: https://kinde.com/api/kinde-mgmt-api-specs.yaml. This is set via the -i
option in the OpenAPI Generator CLI, for example:
openapi-generator-cli generate -i https://kinde.com/api/kinde-mgmt-api-specs.yaml
The SDK gets outputted to: generated-sdk
, which you can enter via:
cd generated-sdk
The instructions provided in the "Usage → Requirements" section above are sufficient to get you started.
Please refer to Kinde’s contributing guidelines.
By contributing to Kinde, you agree that your contributions will be licensed under its MIT License.