hi I'm going to show you how to integrate kind with neck ja in just a few simple steps I'll all go through setting up your kind account and configuring your next project for a secure authentication from a start to finish I'll show you how easy it is to get this done so let's dive in and get your app authenticated with kind in no time all right let's go to the kindo website kind. com and from here you have to create a new account so you can create a new account by pressing this start for free button I have already created an account in kind and I have some projects here so I can just sign in and I'm okay with Google so I'm just continue with Google you can see here I have some older projects so to create a new projects I have uh at first I have to select any of my older projects first first and then uh I can switch the business uh they call it uh they call projects to business so I'm just switching switching my business and you can see that I have already some uh older projects so from here I can just add a new business or projects okay so we can uh give a project name from here I'm going to name it kind does uh and the domain name uh should not be in any High pen number of employees remain same region Australia Sydney uh okay uh I'm okay with Australia uh but if you want to change to others you can select any of them and save save the project so our business uh successfully created uh from here we can see that kind to so just select the domain name from here and we will see the project setup so I want to create no I want to use an existing code base since we will use nees and next and we have to select our NE uh is stack from uh various types of Technologies so we will select NE and next how do user sign in so from here you can select which type authentication systems can user use to authenticate to your application so this is the card you can see will be exact same when your user will uh sign into your application so if I add Apple then user can continue with their Apple account and this is the card exactly will be looking like when when a user will sign in or sign up to your application this this uh card will be shown uh to your application in in your NE application specifically so I'm not going to turn on the Apple rather I will turn on Google so continue with Google is good for me but if you want to add U gitlab GitHub Facebook then you can just turn on from here and user can continue with their Facebook account or GitHub accounts so for Simplicity I'm just adding Google and you can see there are lot of way to sign in or sign up a user all right so I'm just going to press the next button and we are okay so no thanks I will explore my uh own pace so this is the dashboard we can see that admin dashboard and from here I just going to uh press the view details in here we can see that we have API keys and this Keys we have to add our Nexis applications so kindai and Nexis application can communicate each other it's super easy so let's see how can we do that this is my existing NE project here I have some pages I have already created this is not a NE tutorial so I'm not going to show you how to create a nextjs page I pretend you already know the basic of no NE JS let's see how our projects look like so this is our nexj application I have created four pages about then uh privacy policy then term of service also I have created another page which is dashboard in this dashboard we will add authentication system or we'll protect this route uh dashboard so any unauthenticated users cannot visit this page until they create or authenticated themsel so right now there is no authentication system added to our uh Nexus application so we are now going to add uh K authentication system to our Nexus application so then user cannot visit dashboard without uh sign in or sign up so let's go to the kind documentation from here or we can go to the kind website directly developers developers Nexes all right so from from here we have to install the kind library or kind SDK to our application so here we can see that three uh package managers npm and pnpm uh if you want to use ear or pnpm so you can just simply copy this command from here I'm good with npm so I'm copying this npm command and I have to paste this command to our applications terminal I'm creating a new terminal and pasting the npm command and it will be installed all right so K SDK or kinda library has been installed to our Nexus application now we are going to moving forward now we have to add our applications URL which is running in the Local Host 3000 port to our uh Kinder websites dashboard so in the call back URL section application homepage URL which is we are using our Local Host machines this is Local Host 3000 and the applications login URL uh should be 3000 API of login and the rest setting remain same just save it all right now let's go to the quick start page from here uh we have to create a file which is env. loal in our nexs application and then we have to copy this environmental variable and P it paste it to there so let's go to our nexj applications so let's create a file.
env. local so mv. LCL local and then paste the environmental variable to here and save it all right now we have to create an authentication root handlers with this directory app API o k and routts since we are using typescript our extension will be.
TS so let's go to our project file and from here in the app directory we'll create a new file in the given uh directory which was API and O and then indat and then root dot TS not JS because we are using typescript and hit enter yes you can see that our root.