1. Introduction
Corbado Connect allows you to seamlessly integrate passkey-first authentication into your existing Okta system. This enables you to offer your users a secure and convenient login experience without passwords, while still leveraging the power of Okta for user management. This guide will walk you through the process of integrating Corbado Connect with Okta, using a sample Next.js application to demonstrate the key concepts. Okta offers multiple authentication solutions that have evolved over time. Corbado Connect supports the following:- Okta Identity Engine (requires custom domain and hosted widget)
- Okta CIC/Auth0 (Auth0 was acquired by Okta and is now part of Okta CIC)
2. How it Works
The integration between Corbado Connect and Okta leverages the industry-standard OAuth 2.0 Authorization Framework and OpenID Connect (OIDC) protocol. This approach allows Corbado Connect to act as an external Identity Provider (IdP) that seamlessly integrates with your existing Okta infrastructure. Instead of users authenticating directly with Okta using traditional credentials, they will authenticate with Corbado Connect using passkeys, and then be federated back to Okta through a secure OIDC flow. This OAuth 2.0/OIDC federation approach ensures that your existing Okta policies, user management, and application integrations remain unchanged while adding the security and convenience of passkey-first authentication. Later in this guide, we will dive deep into this concept.3. Example Application
To best illustrate the integration, we will refer to a complete example application. This application is built with the following technologies:- Next.js: A popular React framework for building server-rendered applications.
Example Application
See the example application using Corbado Connect and Okta in action.
4. Passkey Enrollment
In our example application, the initial user sign-up is handled through a conventional method (e.g., email and password) managed by Okta. Once the user has an account and is logged in, we offer them the option to add a passkey to their account for future passwordless logins. This process is often called “passkey append”. The complete flow is illustrated in detail here.4.1 Web UI Component Integration
To enable passkey creation we use the CorbadoConnectAppend component from the@corbado/connect-react
library. The component takes care of the entire UI and logic for creating and storing the passkey.
Here’s how it’s used in our example application’s post-login
page:
/application/okta/app/(auth-required)/post-login/page.tsx
For a detailed explanation of all available props for this component, please see the CorbadoConnectAppend component documentation.
4.2 Obtaining the Connect Token
When the component is initialized, it executes the function given inappendTokenProvider
to request a connect token from Corbado’s Backend API (this token authorizes the creation of a passkey for a specific and authenticated user).
It uses a Next.js Server Action that first verifies the session and then calls the utility function getCorbadoConnectToken()
:
/application/okta/app/(auth-required)/post-login/actions.ts
5. Passkey Login
Now that users can associate passkeys with their accounts, we can enable a truly passwordless login experience. This is where the OAuth 2.0/OIDC federation we outlined in the “How it Works” section becomes essential. The goal is to authenticate a user with their passkey using Corbado Connect and, upon success, establish an authenticated session with Okta. The complete flow is illustrated in detail here.5.1 Web UI Component Integration
Unlike passkey enrollment, the login process is more complex because we need to integrate the CorbadoConnectLogin component directly into Okta’s hosted sign-in page (hosted widget). This integration is accomplished through the Okta Admin Console under Customizations > Brands. We will explain the most important changes next. First, you need to load the JavaScript and CSS for the CorbadoConnectLogin component. Extend the<head>
with the following <script>
and <link>
tags:
For a detailed explanation of all available props for this component, please see the CorbadoConnectLogin component documentation.
5.2 OAuth 2.0/OIDC Federation
As explained above, Corbado Connect functions as an OIDC server and can be used for OAuth 2.0/OIDC federation. To enable this integration, you need to create a new Identity Provider in the Okta Admin Console under Security > Identity Providers. The following simplified sequence diagram illustrates how the different components work together in the federation process:6. Passkey Management
After users have created their initial passkeys during sign-up and used them for login, they need a way to manage their existing passkeys. Passkey management encompasses three main operations:- Viewing existing passkeys
- Creating additional passkeys
- Deleting unused passkeys
6.1 Web UI Component Integration
We integrate the CorbadoConnectPasskeyList component from the@corbado/connect-react
library. This component provides a complete user interface for managing passkeys, including viewing, adding, and deleting them.
Here’s how it’s used in our example application’s profile page:
/application/okta/app/(auth-required)/profile/PasskeySection.tsx
For a detailed explanation of all available props for this component, please see the CorbadoConnectPasskeyList component documentation.
6.2 Obtaining the Connect Token
When the component needs to perform an operation (like deleting a passkey), it executes the function given inconnectTokenProvider
to request a connect token from Corbado’s Backend API. This token authorizes the specific operation for the authenticated user.
It uses a Next.js Server Action that first verifies the session and then calls the utility function getCorbadoConnectToken()
:
/application/okta/app/(auth-required)/profile/actions.tsx
connectTokenType
to specify which operation the token should authorize (in this case, it could be ‘passkey-list’, ‘passkey-add’, or ‘passkey-delete’).