clientState Management with Corbado Connect
The clientState in Corbado Connect helps manage state for a smooth user experience. Learn how it works for passkey operations and autofill.
Whenever a user completes a passkey ceremony (e.g., appending or logging in with a passkey), the Corbado Connect UI components return a string called clientState
. This clientState
contains environment-related information (e.g., details used to optimize One-tap, passkey usage and detect environments) so that future interactions can be streamlined and personalized.
- Purpose: The
clientState
lets Corbado remember certain details from the user’s current device and environment. For example, if passkey usage was already confirmed, or if certain One-tap flows are possible on this device, re-running all checks can be skipped the next time the user interacts with your passkey UI. - Persistence: By default, Corbado automatically stores the
clientState
in the browser’slocalStorage
. The strongest persistence is a first-party cookie. Passing the storedclientState
back into any future Corbado Connect UI component will speed up environment detection and reduce friction for repeat passkey usage.
When you render the Corbado Connect UI component again, retrieve that clientState
and provide it to the Corbado Connect UI component to enable faster load times and a more seamless passkey flow. By leveraging clientState
across sessions, you ensure that your users are offered an optimal passkey experience (including One-tap passkey logins) without having to repeat environment checks or initial detections on every visit. This is typically a great booster for the login conversion rate of the solution.