upgrade

abstract suspend fun upgrade(optionsJson: String): PasskeyResult<PasskeyRegistration>

Silently creates a passkey for a user who just signed in with a password (conditional create). The provider decides whether to create one; no sheet is shown. Requires PasskeyCapabilities.conditionalCreate. Typical errors: PasskeyError.NotSupported, PasskeyError.AlreadyRegistered, PasskeyError.InvalidOptions, PasskeyError.Misconfigured.

Conditional creation is opportunistic: providers may decline (e.g. iOS requires a recent password-autofill sign-in). A decline is reported as PasskeyError.NotSupported on both platforms: on Android when the credential provider rejects conditional create (Play services may answer with a status such as 17), on iOS when the system declines silently without showing UI. Treat any failure as silent; never show an error to the user.