Integration
How to integrate Corbado Connect into your application
Integrating Corbado Connect into your application is straightforward and designed to work with a variety of frameworks and architectures. Whether you choose to use passkeys as a primary authentication method or as a second factor (2FA), the process involves only minimal changes to your existing codebase.
Frontend Integration
On the frontend, the integration requires just a few lines of JavaScript, which are framework-agnostic. The Corbado Connect UI components manage most of the complexity behind the scenes, handling communication with the user’s device, biometric prompts, and fallback mechanisms.
- JavaScript snippet: You will embed a lightweight JavaScript snippet in your login or authentication page. This snippet interacts with the user’s device, prompts for biometrics, and seamlessly manages the passkey flow.
- Callbacks for fallback handling: If the passkey process is canceled or fails, Corbado provides a callback that automatically restores the previous authentication method. For example, the user might be redirected back to the password login page or be prompted to use another 2FA method. This ensures a smooth experience even when the passkey process doesn’t complete as expected.
- Customizable UI: You can customize the appearance of the passkey prompts and messages to match your application’s look and feel, ensuring a cohesive user experience.
Backend Integration
The backend setup is equally simple. You will need to make a few API calls to complete the integration and maintain session integrity.
- Session Management: After a successful passkey authentication on the frontend, the backend must establish a session for the user in your existing system. This is done through a set of API calls that securely communicate the passkey authentication result.
- No User Migration Required: One of the benefits of Corbado Connect is that it does not require migrating your user database. Users can continue using their existing credentials and data structures, while passkeys add an extra layer of security.
Fast and Reliable Implementation
With only a few lines of JavaScript on the frontend and 2-3 simple API calls on the backend, Corbado Connect is fast to implement and robust in handling various edge cases. Whether you’re using a modern framework like React, Angular, or Vue, or a more traditional setup, Corbado’s passkey solution will fit seamlessly into your architecture.
Pro tip: The Corbado library is optimized for minimal impact on page load times, ensuring that your user experience remains fast and responsive.
For more detailed integration guides, see our reach out to us via email or Slack for a personalized walkthrough.
Was this page helpful?