Kinde SDKs
SDKs and APIs
Vercel is a cloud platform which enables seamless deployment directly from a GitHub repository, offering scalability, performance, and security. You can use it to streamline the development and deployment process of applications.
If you want to test what your app will look like with Kinde auth, follow this guide. Let’s deploy an app on Vercel!
If you don’t have an existing project, create a project with a starter kit from Kinde.
.env.local.sample
. You will need this later.Sign in to the Vercel Dashboard. You’ll see a list of all your projects if you have them.
In the top right, select Add New, then select Project.
Pick the repository you want to deploy to Vercel (e.g. the one you created above if you used the starter kit). This tutorial uses the project cloned from the previous step vercel-nextjs-kinde
.
Select Import next to the project you want to deploy.
On the Configure Project page, expand the Environment Variables section:
Open the local .env
file from your project and copy all the contents.
Paste the details into the Environment Variables section in Vercel. Vercel will autofill your keys and values for you.
Once you are done, select Deploy. Your project will deploy to Vercel. This may take a minute or two. When the process is finished, you will see the Congratulations! page.
Vercel generates a public URL for accessing your site. E.g. https://vercel-nextjs-kinde.vercel.app/
. Copy the URL to use in a later step, where we will update the Kinde callback URLs.
Sign in to your Kinde business and go to Settings.
Select Applications.
If you do not have any applications yet, create one. Follow this guide.
If you have already created your app, select View details on the application tile.
Scroll to the App keys section and copy the Domain, Client ID, and Client secret somewhere you can access it again.
Scroll to the Callback URLs section and enter the URL you copied when you deployed on Vercel. The URL will be something like <NAME_OF_YOUR_PROJECT>.vercel.app
, for example https://vercel-nextjs-kinde.vercel.app
.
Enter the URL in the Application homepage URI field, the Application login URI field, and the Allowed logout redirect URLs field.
If you were using https://localhost:3000
, replace it with your new domain in the Allowed callback URLs field. If you’re using a starter kit, this might be: https://vercel-nextjs-kinde.vercel.app/dashboard
.
Select Save.
Open your Vercel project dashboard and navigate to your project. Select the three dots … menu, then Settings.
Select Environment Variables.
Edit the values of each environment variable by selecting three dots menu, then selecting Edit.
In the window that opens, enter the new value for the variable, then select Save.
Change the variables as follows, using Kinde values:
Change the variables as follows, using Vercel values:
You need to deploy your Vercel instance to apply the updated variables.
Go to the Deployments section.
Select the three dots … menu and select Re-deploy.
Do not select Use existing Build Cache as that will preserve the old environment variables
Your website will now be fully functional and you can authenticate with Kinde!
Remember, if you need any assistance with getting Kinde connected reach out to support@kinde.com. You can also join the Kinde community on Slack or the Kinde community on Discord for support and advice from the team and others working with Kinde.
Congratulations 🎉 on deploying your Kinde project to Vercel!