Learn how to integrate passkey authentication into your web application using the Corbado Web UI Components. This guide covers setup, passkey enrollment, login, and management.
CorbadoConnectAppend
component, which is designed to be used immediately after a user has been authenticated through your existing system. The component guides users through creating (or “appending”) a passkey to their account, but only if they and their device meet the eligibility requirements.
Here’s an example integration:
appendTokenProvider
to request a connectToken from your backend.
For detailed instructions on how to implement the required endpoint in your backend, please refer to our Backend Setup guide.
post-append
action is triggered after successful passkey creation. Here’s an example of how you might implement this action:
post-login
action to create and return a session. This approach minimizes the integration effort while maintaining security.
Here’s how the flow typically works:
The implementation involves creating a post-login
action:
CorbadoConnectLogin
component. The component takes care of the entire UI and logic for handling the passkey login and passing the result to our application logic to complete the login.
Here’s an example integration:
onComplete
callback will be provided in the subsequent sections.
onComplete
callback needs to send the signedPasskeyData to your verification endpoint and redirect to the profile page:
result
object, simplifying the frontend logic:
CorbadoConnectPasskeyList
component offers a complete, pre-built UI for users to list, add, and delete passkeys associated with their account.
This component should be placed in a secure, authenticated area of your application, such as a user profile or account settings page.
CorbadoConnectPasskeyList
component requires a distinct connectToken to perform each of its actions. Much like the enrollment flow, these tokens must be securely fetched from your backend to authorize each specific operation for the logged-in user.
CorbadoConnectPasskeyList
component on a profile or settings page. The component will handle all the logic for displaying passkeys and managing user interactions:
connectTokenProvider
function is the bridge to your backend. It’s responsible for fetching a connectToken from your backend for the specific action (passkey-list
, passkey-append
, or passkey-delete
) the user wants to perform. The implementation of this endpoint is described in our Backend Setup guide.
When a user opens the page, the component will call connectTokenProvider('passkey-list')
to get a token to display the existing passkeys. If they try to delete a passkey, it will call connectTokenProvider('passkey-delete')
, and so on. This ensures every action is explicitly authorized by your backend for the currently authenticated user.