The Kinde Starter Kit for ExpressJS.
-
Clone the repository to your machine:
git clone https://github.com/kinde-starter-kits/expressjs-starter-kit.git
-
Go into the project:
cd expressjs-starter-kit
-
Install the dependencies:
npm install
To get started set up an account on Kinde. Make a copy of .env_sample
and name it simply .env
. Set the following values from the Kinde Settings -> Applications -> Backend app
page.
KINDE_ISSUER_URL - The domain value
KINDE_CLIENT_ID - The client id
KINDE_CLIENT_SECRET - The client secret
KINDE_SITE_URL - Your App's domain value
KINDE_REDIRECT_URL - Kinde will redirect here after login
KINDE_POST_LOGOUT_REDIRECT_URL - Kinde will redirect here after logout
e.g
KINDE_SITE_URL=http://localhost:3000
KINDE_ISSUER_URL=https://<your_subdomain>.kinde.com
KINDE_POST_LOGOUT_REDIRECT_URL=http://localhost:3000
KINDE_CLIENT_ID=<YOUR_CLIENT_ID>
KINDE_CLIENT_SECRET=<YOUR_CLIENT_SECRET>
KINDE_REDIRECT_URL=http://localhost:3000/kinde_callback
Your user will be redirected to Kinde to authenticate. After they have logged in or registered they will be redirected back to your ExpressJS application.
You need to specify in Kinde which url you would like your user to be redirected to in order to authenticate your app.
On the App Keys page set Redirect url
to http://localhost:3000/kinde_callback
Important! This is required for your users to successfully log in to your app.
You will also need to set the url they will be redirected to upon logout. Set the Logout url
to http://localhost:3000.
npm start
and navigate to http://localhost:3000
.
Click on Sign up
and register your first user for your business! 🚀
Please refer to Kinde’s contributing guidelines.
By contributing to Kinde, you agree that your contributions will be licensed under its MIT License.