The Kinde SDK for Go.
Requires Go 1.21+
go get github.com/kinde-oss/kinde-go
go mod tidy
import (
"github.com/kinde-oss/kinde-go/jwt"
"github.com/kinde-oss/kinde-go/oauth2/authorization_code"
)
Example is in the test: authorization_code_test.go
import (
"github.com/kinde-oss/kinde-go/jwt"
"github.com/kinde-oss/kinde-go/oauth2/client_credentials"
)
Example is in the test: client_credentials_test.go
token, err := kindeClient.GetToken(context.Background())
//This client will cache the token and re-fetch a new one as it expires
client := kindeClient.GetClient(context.Background())
//example call to Kinde Management API (client needs WithKindeManagementAPI(...))
businessDetails, err := client.Get(fmt.Sprintf("%v/api/v1/business.json", os.Getenv("KINDE_SUB_DOMAIN")))
-
Clone the repository to your machine:
git clone https://github.com/kinde-oss/kinde-go.git
-
Go into the project:
cd kinde-go
-
Install the dependencies:
go mod download
For details on integrating this SDK into your project, head over to the Kinde docs and see the Go SDK doc 👍🏼.
The core team handles publishing.
Please refer to Kinde’s contributing guidelines.
By contributing to Kinde, you agree that your contributions will be licensed under its MIT License.