Kinde SDKs
SDKs and APIs
Once you have completed the onboarding process, you are ready to add Kinde auth to your codebase.
During the onboarding process, you created an application in Kinde. You can use this application by going to your Kinde dashboard and selecting View details on that application tile. Skip to the next step (use a starter kit or install manually).
If you want to start over, follow the steps:
Go to your Kinde dashboard and select Add application.
Enter a name for the application (e.g., “My Next.js App”), select the type of application, and select Save.
If you are unsure about which application type to select, head over to our SDK page and find the language or framework you are using. For backend/fullstack apps, select Back-end web. For client-side apps like web and mobile, select Front end and mobile.
Select the application language/framework (e.g., Next.js) and select Save.
On the Quick start page of your application, you have two options:
On the Quick start page, set the callback and redirect URLs for your app.
For development, the URLs will be something like http://localhost:3000/ and for production, this will be your live production URL (e.g., https://myapp.com).
These define where a user goes when they sign in to your app. You need to set these to enable users to sign up.
Enter your local development URL to get started.
http://localhost:3000 is an example of a commonly used local development URL. It should be replaced with the URL where your app is running.
You can update or remove them from the Details page of your application.
You can add more URLs later, when your production environment is ready to go live or you set up a custom domain.
Go to the Details page of your application to find your app keys.
Copy the following:
yourbrandname.kinde.com or your custom domain)Your code base will include an .env file (or something similar) for storing configuration information. Add the Kinde app details you copied from the Details page to your .env file.
Here’s an example from the Next.js app router SDK:
KINDE_CLIENT_ID=<your_kinde_client_id>KINDE_CLIENT_SECRET=<your_kinde_client_secret>KINDE_ISSUER_URL=https://<your_kinde_subdomain>.kinde.comKINDE_SITE_URL=http://localhost:3000KINDE_POST_LOGOUT_REDIRECT_URL=http://localhost:3000KINDE_POST_LOGIN_REDIRECT_URL=http://localhost:3000/dashboardMake sure you do not commit your client secret to source control, by adding your .env file to your .gitignore file.
Run your app locally and select the Sign up button. You’ll be redirected to the Kinde login page.
Complete the sign-up process and you’ll be redirected back to your app’s dashboard page. If you run into an issue, take a look at the common error codes page.
Go to your Kinde dashboard > Users to find the user profile you just created.
Here, you can edit this user’s profile details and even perform admin actions like suspending or deleting the user. Read more about user management in Kinde.
Users created in different applications all add to the same environment in your Kinde business.
Kinde comes with a default production environment, and the ability to create additional non-production environments. This is useful for testing in different environments without having to sign up for a new account.
To create a test environment, do the following:
Go to your Kinde dashboard, and select the arrow next to the production environment dropdown (top-left of the screen). A pop-up appears.
Select All environments
On the Environments page, select Add environment
Enter a Name (e.g., “Test”) and a URL-friendly Code for the environment (e.g., “test”), then select Save. A new environment is created.
Select the Switch to this environment button to switch to the new environment.
Every new environment comes with two default applications:
Your Kinde domain for this environment will be in the following format:
https://<yourbrandname>-<env-code>.<your-region>.kinde.come.g: https://yourbrandname-test.au.kinde.comKinde free plan allows you to create only one non-production environment. If you want to create more (e.g., dev, staging), you will need a paid plan. See Kinde pricing for more details.
If your app communicates with back-end APIs, register them with Kinde so they can be included in the aud claim of access tokens.
See the full Register and manage APIs guide for token request examples and managing scopes.
The Kinde Management API lets you automate admin tasks such as managing users, roles, permissions, and applications. To get started:
Go to your Kinde dashboard and select Add application.
Give it a name and select Machine to machine as the type, then select Save.
Go to the APIs page, select the three dots next to the Kinde Management API and choose Authorize application.
Select the three dots again and choose Manage scopes. Enable only the scopes you need, then select Save.
Go to Details page and copy the Domain, Client ID and Client secret.
Use the client_credentials grant type to get a token and make authorized requests to the Kinde Management API. See: Call the Management API.
You can also get a test token from the Quick start page for testing purposes.
Do not embed dashboard-generated Management API tokens in client-side code or long-lived production jobs. For production, request tokens server-side via the machine-to-machine client credentials flow and store secrets in your secure environment configuration.
See the full Kinde Management API reference for available endpoints and usage examples.
The production deployment process varies by hosting provider and application stack. Use these steps as a general checklist when you deploy your Kinde auth app to production:
For more detail, see:
Here are some advanced developer topics to explore:
Now that you have added Kinde auth to your codebase, here are some next steps: