- Published on
NextJS + Okta Authentication
- Authors
- Name
- Tony Mamedbekov
- @tmamedbekov
What is Okta?
Okta is one trusted platform to secure every identity, from customers to your workforce. More than 9,400 organizations trust Okta’s software and APIs to sign in, authorize, and manage users.
We will start by creating a new NextJS app
npx create-next-app
Then we will install all the dependencies and start our local server
yarn
yarn dev
After few modifications it should look something like this
Next we will add Okta React SDK.
npm install --save @okta/okta-react
Here are all the dependencies that we will need, and how your package.json
should look like:
"dependencies": {
"@okta/okta-react": "^4.1.0",
"next": "10.0.7",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-router-dom": "^5.2.0"
}
Next Navigation to Okta https://developer.okta.com/ and create and an account and application.