So far we’ve learned how to create an organization, an app integration, and configure our keys to set up basic Okta authentication. Now, let’s see how we can sign in a user to an application with Okta.

Define a callback route

In order to sign in, our application will redirect the user to the Okta-hosted sign-in page. After signing in, the user will be redirected by Okta to the application along with their necessary information. Therefore, the first thing we need to define is where Okta redirects our user to after authentication. This is referred to as the callback route or redirect URI.

Note: The user can’t see the callback route, nor is it their final destination. The callback route is just one stop in the authentication redirect flow.

In our application, we are going to use login/callback as the default route path. However, we can change it depending on the flow of our application.

Get hands-on with 1200+ tech skills courses.